I'm using Openlayers + Views + Geofield to display a map of entities (each has a polygon stored in a geofield). I need to be able to control how the polygons overlap on the finished map, so that smaller ones don't end up behind larger ones. I have a weight field on the entities, and I tried adding that as a sort in the Views that generate the map, but it doesn't seem to have an effect on the order in which the map features are drawn. Is there any way to do that?

How does Openlayers determine the order of drawing?

And more generally: is it safe to assume that a polygon that is drawn last will appear on TOP in the rendered map? Meaning you can click on the top one to select it?

Comments

m.stenta’s picture

Here is a related question on gis.stackexchange.net (not Drupal specific): http://gis.stackexchange.com/questions/29223/dealing-with-overlapping-fe...

m.stenta’s picture

Status: Active » Closed (works as designed)

I figured out my issue... pretty dumb. I was changing the layer weight of my overlays, but I forgot to enable the popup and zoom-to behaviors for them... doing that fix it. And now it works as expected. :-)