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

402
Views
Leaflet/Vue 3 Issue Uncaught TypeError: Cannot read properties of null / this._map is null

I am facing an error on Leaflet on Vue 3 whenever i try to zoom in or out when a popup is closed. The error on Mozilla:

Uncaught TypeError: this._map is null Popup.js

and the error on chrome

Uncaught TypeError: Cannot read properties of null (reading '_latLngToNewLayerPoint') Popup.js

Other than this, on some instances when the error occurs, the markers on the map stop moving with the zoom animation while zooming in and out. One of the solutions was to set soomAnimation as false which I cannot do with, I need the animations on my UI. I also tried a solution to properly unwrap / unproxy this.map before using it with Leaflet where I changed all the this.map instances in my script to toRaw(this.map) but the error still persists.

  L.geoJSON(geoJson, {
    onEachFeature: function (feature, layer) {
      self.onEachFeature(feature, layer);
      layer.on({
        click: self.clickMarker,
      });
    },
  }).addTo(self.markerLayer);

  self.markerLayer.addTo(toRaw(self.map));

I have tried updating Leaflet too but nothing works. Please Help

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You probably need to do the same unwrapping process whenever you refer to an object that you also store in your Vue3 component state, like self.markerLayer, and similarly if you use those within your self.onEachFeature and self.clickMarker methods.

about 4 years ago · Juan Pablo Isaza Report
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!