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

178
Views
Cambio de geojson de exportación de folletos de latitud y longitud

Hola, actualmente estoy usando este código para dibujar polígonos de folletos, etc. Funciona perfectamente, pero cuando exporto a geoJson termino obteniendo latitud y longitud en posiciones "invertidas". ¿Cómo puedo cambiarlos para que les guste cambiar de lugar para que en su lugar de -9.0230, 29.923 será 29.923, -9.0230.

 var featureGroup = L.featureGroup().addTo(map); var drawControl = new L.Control.Draw({ edit: { featureGroup: featureGroup, }, }).addTo(map); map.on("draw:created", function (e) { // Each time a feaute is created, it's added to the over arching feature group featureGroup.addLayer(e.layer); }); // on click, clear all layers document.getElementById("delete").onclick = function (e) { featureGroup.clearLayers(); }; document.getElementById("export").onclick = function (e) { // Extract GeoJson from featureGroup var data = featureGroup.toGeoJSON(); // Stringify the GeoJson var convertedData = "text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(data)); // Create export document .getElementById("export") .setAttribute("href", "data:" + convertedData); document.getElementById("export").setAttribute("download", "data.geojson"); };
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!