2

Here's my map: https://jsfiddle.net/Sidders/4exf969e/3/

I want to apply a click and hover effect to the polygons. So a polygon/multipolygon highlights on hover, and is selected with one click. The hover effect resets on 'mouseOut', and the select effect resets when another polygon/multipolygon is selected.

However, when I click between multipolygons (e.g. see the islands around Scotland) they don't fully 'reset' and some polygons stay highlighted. It becomes a mess, and I think it's because e.layer does not work with multipolygons.

How do I amend my code so I can cleanly select and click between multipolygons on my map?

  • 2
    The link is not working – Jorge Sanz Nov 22 '16 at 12:02

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.