VERIFIED SOLUTION i
X

How to print a map from a desktop application using MapXtreme

UPDATED: September 19, 2017



There exists a new class that allows developers to easily include printing into their application. In order to take advantage of this feature, it is necessary to include the following reference in the project:

MapInfo.Windows.Printing

This will grant access to the MapPrinting class. See the code sample below.

Dim printMap As New MapInfo.Printing.MapPrinting
printMap.Map = MapControl1.Map
'Set the page layout - optional
If rbLetter.Checked = True Then
printMap.PageSettings.Landscape = False
Else
printMap.PageSettings.Landscape = True
End If
printMap.ShowDialog = True
printMap.Print()


5%;fo�`ai@�P��rier New";mso-fareast-font-family:"Times New Roman";color:black'> New MapInfo.Geometry.DPoint
Dim converter As MapInfo.Geometry.DisplayTransform = MapControl1.Map.DisplayTransform()
converter.FromDisplay(DisplayPoint, MapPoint)
StatusBar1.Text = "Cursor Location: " & MapPoint.x.ToString() & ", " & MapPoint.y.ToString()
End Sub

Environment Details

Products affected: MapXtreme™

Downloads

  • No Downloads