Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

172
Views
Uncaught TypeError: Cannot read properties of undefined (reading 'lat')

I have tried to implement the onClick event using this vectorGrid 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?

Link to the jsfiddle: https://jsfiddle.net/iamtekson/a6s4qj8p/6/

Note: I have tried this plugin on these leaflet versions (1.0.0 to 1.2.0) which are working fine. But with the latest leaflet version, the plugin is out of date.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!