Transparent Overlays

Jul 3, 2010 at 1:23 PM

Hi all (and Radioman).

GMap.NET looks like a great little library. I've been taking a look at it and reading a few posts on the discussions. Something I've not been able to figure out are the capabilities for transparent overlays. As there aren't any tutorials I decided posting here would be a better place to start.

What I'm interested in doing essentially is building up a set of transparent layers on top of the raster background map. For example one layer might contain a set of markers, another a set of labels while a 3rd layer might contain some polygon/regions all with the map in the background. Then the visibility of these can be toggled allowing you to build up various views of the map.

Is this sort of thing possible already? If not what sort of approach is needed to add it? Obviously some different layer classes, which I might look into adding. The thing I'm a little unsure on are to do with changing scales (e.g. only painting the icons in the map region, changing the size of points depending on the map scale etc...) Any suggestions would be great.


Jul 3, 2010 at 1:34 PM

When rendering lines polygons or whatever set the alpha value for the color value to get transparency.


For rendering images set up a color matrix.



Jul 3, 2010 at 1:35 PM

hey IanWright83 ;}

..layers are just objects for grouping your markers/routes/polygons, so what you see on the map actually depends only on these.

Rendering from down -> top. Each marker can draw anything, transparent or not. Map stays the same in the very bottom, so always visible.










Jul 3, 2010 at 1:58 PM

Ah, so they exist already?

Are there any examples of how these work to get me started?

Jul 3, 2010 at 2:02 PM

just look in demo source

Jul 3, 2010 at 10:09 PM

thanks radioman, managed to find the example that I'm now working from.