Skip to main content
7 events
when toggle format what by license comment
Feb 11, 2019 at 17:00 comment added TomazicM Yes, this is the final possibility when running from file system.
Feb 11, 2019 at 15:47 comment added Bill Chappell You could place a script tag in the HTML <script src="sample-geojson.js" type="text/javascript"></script> and then put a variable in the GeoJOSN file, Finally using L.geoJSON leafletjs.com/examples/geojson But really it should be on a web server.
Feb 11, 2019 at 14:48 comment added TomazicM I was not clear enough. PVar runs his/her map page (probably something.html) locally from file system, not from web server. And then there come CORS problems (see EDIT2 in my answer).
Feb 11, 2019 at 14:42 comment added Bill Chappell Yes, I edited my response the include my url variable, it's just a GeoJSON file stuck in the same web folder as the html. It could be a PHP page service GeoJSON, if you wanted dynamic data from a database, but static data from a file works also.
Feb 11, 2019 at 14:40 history edited Bill Chappell CC BY-SA 4.0
added 58 characters in body
Feb 11, 2019 at 14:36 comment added TomazicM Does this solution work if you run page locally from file system and geojson file is also local file? Because that's basically the problem that PVar has.
Feb 11, 2019 at 14:06 history answered Bill Chappell CC BY-SA 4.0