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

180
Views
El navegador informa de un error al hacer referencia al archivo geojson

Al hacer referencia a geojson, el navegador informa un error de la siguiente manera

 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:

Mi código JS es el siguiente

 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' } });

Los datos de geojson son los siguientes

 { "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 ] } },

Revisé los ejemplos oficiales y los datos geojson de muestra, y también verifiqué la corrección de los datos genjson

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

0

Es bastante sencillo: recibe un error 404 (archivo no encontrado) al acceder a https://domain/resource/point.geojson. Esa URL (o la que sea real) no es correcta.

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!