While using vectorGrid.protobuf for displaying vector tiles on map i was not able to capture mouse events initially until when i zoomed out to minzoom

19 views Asked by At

This is code snippet for displaying the vector tile layer on the map

vectorTileLayer = new (L as any).vectorGrid.protobuf(layer.url, {
...layer.layerOptions,
interactive: true,
});

because of the interactive = true the pointer events are being enabled, but this is causing additional issue.when the map is initially loaded no mouse event is working even drag and click also not working until when the map is zoomed out to minimum zoom level after then everything is working fine.

I tried using setimeout to render vector layers but no solution

0

There are 0 answers