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?

1
  • 2
    The link is not working
    – Jorge Sanz
    Commented Nov 22, 2016 at 12:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.