Leaflet js and getting geojson file not working as expected. |
If I put the geojson file inline, it works fine. Here is a sample;
Code: var geojson = { Above produced several makers on my map. However, if I try to read in a geojson file from /public/user_public/ski/data/drinkingwater.geojson as follows; Code: var japanGeoJSON = false; Above produces: Response {type: 'basic', url: 'https://development.example.com/user_public/ski/data/drinkingwater.geojson', redirected: false, status: 200, ok: true, …} "Invalid GeoJSON object." Wondering why this may be the case.
Maybe this will help you out.
MDN - Using the Fetch API What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |