VERIFIED SOLUTION i
X

How to clone a map in Mapxtreme.

UPDATED: April 3, 2017


The Map object can be exported to a file, a stream, or an image object. You can specify the 'ExportFormat'  when using for the image.
You can also specify which 'ExportPixelFormat'  you would like the exported image to have after import..

Examples

If you are using a MapControl. must clone the map prior to exporting it, as shown in the example below:
 
public static void MapInfo_Mapping_MapExport(MapControl mapControl1) {
    Map newMap = (Map)mapControl1.Map.Clone(); // must clone since map is coming from mapcontrol and is linked to it via the HWND
    MapExport exportObject = new MapExport(newMap);
    exportObject.ExportSize = new MapInfo.Mapping.ExportSize(2931, 4104);
    exportObject.Format = ExportFormat.Gif;
    exportObject.Export(@"C:\Temp\ExportImage.gif");
}

Environment Details

Product Feature: Map cloning

 

Downloads

  • No Downloads