Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

315
Visualizações
Leaflet - Invalid LatLng object: (undefined, -0.3783868407297,43.304121626953)

I'm trying to display small circles (or markers) on a map with leaflet from a geojson file. It works with "MultiPolygon" geometry type but not with "Point" geometry type. I don't understand why ?

// My GeoJson points
let Points = {"type":"FeatureCollection","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}},"features":[{"type":"Feature","properties":{"id":"25","name":"Essai Point","activity":"WC","image":"image4.jpg"},"geometry":{"type":"Point","coordinates":[[-0.3783868407297,43.304121626953]]}},{"type":"Feature","properties":{"id":"27","name":"Essai Point2","activity":"WC","image":"image5.jpg"},"geometry":{"type":"Point","coordinates":[[-0.378387,43.30413]]}}]}

// My JavaScript code
let style = {  radius: 8,
               fillColor: "#ff7800",
               color: "#000",
               weight: 1,
               opacity: 1,
               fillOpacity: 0.8                    
             };

let circles = L.geoJson(Points, {
    pointToLayer: function (feature, latlng) {
        return L.circleMarker(latlng, style);
    }
    }).addTo(mymap);

</script>```

// Console error
LatLng.js:32 
Uncaught Error: Invalid LatLng object: (undefined, -0.3783868407297,43.304121626953)
    at new D (LatLng.js:32)
    at We (GeoJSON.js:235)
    at De (GeoJSON.js:186)
    at i.addData (GeoJSON.js:117)
    at i.addData (GeoJSON.js:107)
    at initialize (GeoJSON.js:92)
    at new i (Class.js:22)
    at Object.Ke (GeoJSON.js:439)
    at noelburos.php:116

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda