ThinkGeo.com    |     Documentation    |     Premium Support

How to save markers in SimpleMarkerOverlay into bitmap file

I want to save markers in bitmap file formats (png, tiff, etc) and able to print it later. I used your PrintPreview example and it generates the *.png file that covers all the layers, but it did not work with markers in SimpleMarkerOverlay. Those markers have lat/long and icon image file associated with. What is the best way to save the markers’ icon in the bitmap file? I couldn’t find any similar example. Any suggestion? Thanks

Hi Eric,

For WPF edition, all our markers implemented as control, so it cannot be print into bitmap by PrintLayers.

As below is two solution for that:
a. Call wpfMap1.GetBitmap

b. Use a custom class for it

Please see attached file for item b

Markers.zip (1.9 KB)

Regards,

Don

Hi Don,

Thanks for the feedback and the example. It works and the process time is better than using PrinterInteractiveOverlay. Also, it can apply to other formats (.tiff, .png, etc). How about *.pdf and *.kml? Is any way to save those markers into *.pdf and *.kml?

Thanks

Hi Eric,

This solution can only be used to export to image formats just like you mentioned, we don’t have API for convert that into pdf and kml.

So if you want to put the image into pdf or kml, I think you should want to implement that via some 3rd part dll or custom code, I found two topics about put image into pdf as below:
https://code.msdn.microsoft.com/windowsapps/How-to-convert-Image-to-1ef3cae5

Wish that’s helpful.

Regards,

Don

Thanks Don,

I’ll look into those links you provided.

Eric

Hi Eric,

If you have any question please let us know.

Regards,

Don