Uncaught TypeError: Cannot read properties of undefined (reading 'lat') #267
Open
Description
opened on Sep 21, 2021
I have tried to implement the onClick event using this plugin as below,
const vectorGrid = L.vectorGrid
.slicer(street, {
rendererFactory: L.svg.tile,
maxNativeZoom: 19,
maxZoom: 20,
interactive: true,
getFeatureId: function (f) {
return f.properties.name;
},
})
.on("click", function (e) {
console.log(e);
})
.addTo(map);
When I clicked the layer, it shows the following error,
Uncaught TypeError: Cannot read properties of undefined (reading 'lat')
at Object.project (Projection.SphericalMercator.js:24)
at Object.latLngToPoint (CRS.js:28)
at i.project (Map.js:993)
at i.latLngToLayerPoint (Map.js:1015)
at i.latLngToContainerPoint (Map.js:1072)
at i._fireDOMEvent (Map.js:1434)
at i._handleDOMEvent (Map.js:1397)
at HTMLDivElement.c (DomEvent.js:92)
In this error log, I didn't find the error linked to my vector grid file. Please help me how can I solve this issue?
Metadata
Assignees
Labels
No labels
Activity