Markers Always On Top

Topics: General
Jan 19, 2012 at 8:34 AM

Hi,

When I add multiple routes and a route is overlapping a marker (layer) the marker is behind the layer, which is obvious. How Do I set it so every marker is "on top of" all other layers?

Coordinator
Jan 19, 2012 at 8:40 AM

add marker layer last, so it will be rendered last

Jan 20, 2012 at 8:59 AM

Hi Radioman!

A Z-order (int) property for the GMapOverlay would be cool (lowest value is furthest back) see http://en.wikipedia.org/wiki/Z-order

Cheers

Xandolph

Coordinator
Jan 20, 2012 at 9:14 AM

..well ObservableCollection doesn't sorts well

Feb 3, 2012 at 7:25 PM

Hi Radioman. It seems I wasn't very clear with my question, or perhaps I don't understand your reply very well (which I doubt), but here's another try. I'm adding routes one by one (manually). Means that the "old" (already rendered) marker will be below the new route-layer. Any suggestions?

Coordinator
Feb 3, 2012 at 7:42 PM

map.Overlays.Add(o1);
map.Overlays.Add(o2);
map.Overlays.Add(o3);
map.Overlays.Add(o4);

=>

render o1 then o2 then o3 then o4

  • so if your route layer is added later than marker layer, route will be rendered last therefore 'on top'
  • if you add markers and routes on the same layer, render order is: routes then polygons then markers then tooltips

so you can create any order you want by using separate overlays for different object types, etc...