I am noticing some strange behavior about mouseover and mouseout events that seems to be linked to the way a VectorGrid is styled.
For a demonstration, I have created a simple CodePen based on the GeoJSON demo linked in your README. It is using Leaflet 1.4.0 and the latest version of Leaflet.VectorGrid. I have registered event handlers for mouseover and mouseout that log messages to the console so you can observe the behavior.
Try moving the mouse into a country, e.g. Spain, and keep moving it around the inside of the country without exiting. I would expect to see only a single mouseover appear in the console, but it seems that multiple mouseout and mouseovers are triggered when the mouse is moving around within a country's boundaries.
Next, remove the vectorTileLayerStyles option so that the style reverts to its default of blue outlines. Now when moving the mouse over the border of a country, it seems that mouseover fires when the mouse moves over the border and mouseout fires when it leaves it. In this case I would expect the mouse events to fire respective of the entire geography, not just its border.
I am noticing some strange behavior about
mouseover
andmouseout
events that seems to be linked to the way a VectorGrid is styled.For a demonstration, I have created a simple CodePen based on the GeoJSON demo linked in your README. It is using Leaflet 1.4.0 and the latest version of Leaflet.VectorGrid. I have registered event handlers for
mouseover
andmouseout
that log messages to the console so you can observe the behavior.https://codepen.io/evsheffield/pen/gEwWga?editors=1010
mouseover
appear in the console, but it seems that multiplemouseout
andmouseover
s are triggered when the mouse is moving around within a country's boundaries.vectorTileLayerStyles
option so that the style reverts to its default of blue outlines. Now when moving the mouse over the border of a country, it seems thatmouseover
fires when the mouse moves over the border andmouseout
fires when it leaves it. In this case I would expect the mouse events to fire respective of the entire geography, not just its border.