OpenLayers - SelectFeature fails on a small polygon on top of a larger polygon

المشرف العام

Administrator
طاقم الإدارة
I'm using new OpenLayers.Control.DrawFeature to draw polygons and OpenLayers.Control.SelectFeature to select a specific polygon. I'm drawing one polgon and then a smaller polygon on top of the first one.

PolyA is a large polygon(50 x 50)PolyB is a smaller polgon (10 x 10) drawn within (on top of) PolyA

Initially I can select and unselect PolyB correctly. However once I have selected and unselected PolyA, PolyB is now hidden behind it and can no longer be selected. Why is that and what can I do to resolve it? Thanks.

select code (straightforward)

select = new OpenLayers.Control.SelectFeature(layer, { highlightOnly: true, clickout: true, toggle: true, onSelect: function(feature) { //do stuff } });

أكثر...
 
أعلى