I have geojson polygons. Code highlights the polygon on mouse over. The problem is: for some polygons, the mouse over does not activate; and sometimes I need to move mouse outside polygon and back in a few times to get it to activate.

Mouseover working Mouseover not working

closed as off-topic by Andre Silva, Kersten, Mapperz Nov 22 '16 at 17:34

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking help to debug/write/improve code must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Providing a clear problem statement and evidence of a code attempt will help others to help you. See: How to create a Minimal, Complete, and Verifiable example." – Kersten, Mapperz
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    Please specify your leaflet version, whether you're using canvas or svg for rendering, whether the problem is in one browser or more than one, and a minimal, complete, verifiable example of a map or a geojson file in which the problem can be reproduced. – IvanSanchez Nov 22 '16 at 11:14
  • 1
    It sounds like your geoJSON file is corrupt. Try validating it at geojsonlint.com – Stephen Lead Nov 24 '16 at 3:03
  • Thanks for the reply Stephen. As you suggested, I tried to validate the geoJSON file. I received the following error "Polygons and MultiPolygons should follow the right-hand rule". I also tried several other polygon shapefiles converted to geoJSON and received the same error. I am now looking to see options on how to fix this. Thank you. – Enviro Nov 29 '16 at 10:20
  • To fix the right hand rule error, check out this nice utility. The geojson files I had properly validated after using this tool. Also note that by default, it will send the processed file to stdout, so pipe it to a file to actually save the results- github.com/mapbox/geojson-rewind – chrismarx Apr 5 '17 at 17:24

Browse other questions tagged or ask your own question.