1

My map has markers in a layer and can select any marker by clicking on it. I also have a layer that contains polygon features, and I can also select these by clicking on them - either the edge or anywhere in the enclosed space.

When a polygon is over a marker, then I can't click on the marker - without hiding or disabling the polygon.

Is there a way to make the polygon feature selectable by clicking on its edges, but transparent to selection in the enclosed area?

Responding to comment from https://gis.stackexchange.com/users/56638/jbalk This is a different question to How to define layer order in Openlayers? however, the solution to that question does point to a good solution here. If the markers are on top of the polygons, then I expect that the markers would receive the click events on the markers but the polygons would receive the click events between the markers. This is not the same as 'make a polygon selectable on the edges', but it would solve my issue. Does that make it a duplicate?

intotecho
  • 902
  • 1
  • 9
  • 22

0 Answers0