1

I'm quite new to openlayers and I was wondering if there was a way to highlight ONLY the center feature of a layer http://openlayers.org/en/v3.0.0/examples/select-features.html

A highlight like the example above would be perfect and although I understand how its done, I have yet to find a way to highlight only the center.

  • When you say center, it is just the centroid or within the feature? – Sergio_Az Feb 4 '16 at 9:16
  • Oh by center I mean the center coordinates of the map itself – Chris Feb 4 '16 at 9:28
  • What you could do would be: 1. Create a point at the center of your map, and update it whenever this move 2. Create a style to this point, bright enough to look like it is selected. If we talk about the center of the map at all times. If not so I have not quite understood the question. – Sergio_Az Feb 4 '16 at 10:18
  • Do you want to highlight feature, that is in the center of map? So whenever you pan map, new feature will be highlighted (or no feature at all - if there isn't any in the center of map)? – user1702401 Feb 4 '16 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.