Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

178
Vistas
The browser reports an error when referencing the geojson file

When referencing geojson, the browser reports an error as follows

Error {status: 404, url: 'https://domain/resource/point.geojson', name: 'e', message: 'Not Found'}message: "Not Found"name: "e"status: 404url: "https://domain/resource/point.geojson"[[Prototype]]: Objectcause: undefinedconstructor: ƒ Error()stackTraceLimit: 10arguments: (...)caller: (...)captureStackTrace: 

My JS code is as follows

map.on('load', function () {

map.addSource('places', {
'type': 'geojson',
'data': 'https://domain/json/point.geojson'
});

map.addLayer({
'id': 'places',
'type': 'circle',
'source': 'places',
'paint': {
'circle-color': '#FF6464',
'circle-radius': 5,
'circle-stroke-width': 0.8,
'circle-stroke-color': '#ffffff'
}
});

The geojson data is as follows

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {
        "description": "<strong>test1</strong><p>2015,2016<br><a href=\"https://domain/77.html\" target=\"_blank\" title=\"Opens in a new window\">test</a></p><img src=\"https://domain/img/2019/04/25/816202630847470.jpeg\" alt=\"test\" width=\"220\" height=\"139\">"
      },
      "geometry": {
        "type": "Point",
        "coordinates": [
          103.93,
          33.26
        ]
      }
    },
    {
      "type": "Feature",
      "properties": {
        "description": "<strong>test2</strong><p>2007~2015,2016,2017,2018<br></p><img src=\"https://domain/img/2019/04/25/816202630847470.jpeg\" alt=\"test\" width=\"220\" height=\"139\">"
      },
      "geometry": {
        "type": "Point",
        "coordinates": [
          116.46,
          39.92
        ]
      }
    },

I checked the official examples and the sample geojson data, and also verified the correctness of the genjson data

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

It's pretty straightforward: you're getting a 404 error (file not found) accessing https://domain/resource/point.geojson. That URL (or whatever the real one is) is not correct.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda