Mar 11, 2010 at 6:57 AM
Edited Mar 11, 2010 at 7:07 AM
I have implemented transparent markers for Windows Mobile, as shown here:
The source for my implementation is
To add to the GMaps solution, you need to do the following:
1. Add 'GMapMarkerTransparent.cs' and 'GMapMarkerTransparentGoogleGreen.cs' to the 'GMap.NET.WindowsForms.Markers' folder of the GMap.NET.WindowsForms project.
2. Add a link to these two files to the 'GMap.NET.WindowsForms.Markers' folder of the GMap.NET.WindowsMobile project.
3. Set the build action of 'bigMarkerGreen.png' and 'shadow50.png' to 'Embedded Resource' in both the WindowsForms and WindowsMobile project.
Transparency won't work without this change. When using Properties.Resources.* (or any other .NET CF imaging objects) to access images, the .NET CF removes transparency information. The images need to be loaded directly from a manifest
resource stream to preserve transparency which is why the build action needs to be changed to 'Embedded Resource'.
4. To view a sample, replace MainForm.cs in either the Windows Forms or Windows Mobile project with the appropriate version from the ZIP file.
As demonstrated by the GMapMarkerTransparentGoogleGreen class, it is easy to implement your own transparent markers based on the abstract GMapMarkerTransparent class.
Just remember to load images directly from a resource stream or file stream to preserve transparency information.
This is implemented with code from both