Geovation / labelgun

🏷️ reducing label clutter across mapping libraries
https://geovation.github.io/labelgun/
113 stars 10 forks source link

Use JSONP in Leaflet example #8

Closed tomchadwin closed 7 years ago

tomchadwin commented 7 years ago

ALoows example to work on loca file system (#7). Feedback welcome.

tomchadwin commented 7 years ago

When running current master locally (ie browsing to it via a file path, not on a local webserver), the GeoJSON fails to load (tested in Chrome/Win7). This PR simplifies the import of the data by making it JSONP, and simply using a script tag in index.html to pull it in. It simplifies example.js by removing the use of the fetch API and related CORS complications.

I would recommend merging this, but it is a judgement call. I'll try to amend the OpenLayers example in the same way (assuming it works in the same way at the moment).