Skip to content
Advertisement

The browser reports an error when referencing the geojson file

When referencing geojson, the browser reports an error as follows

JavaScript

My JS code is as follows

JavaScript

The geojson data is as follows

JavaScript

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

Advertisement

Answer

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.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement