leaflet-maps-with-google-sheets icon indicating copy to clipboard operation
leaflet-maps-with-google-sheets copied to clipboard

known issue: Chrome local developer cross-origins error for GeoJSON

Open JackDougherty opened this issue 8 years ago • 1 comments

We may not be able to fix this, so make a note to warn novice mapmakers:

If testing the map on a local computer (rather than GitHub Pages), use Firefox browser, because Chrome generates a cross-origins error for polygon GeoJSON

JackDougherty avatar Nov 23 '16 18:11 JackDougherty

Ilya's notes about the underlying problem: Leaflet ‘forces’ http instead of https when using maps locally on your computer, as your local machine is an insecure location and HTTPS does not work with it, so leaflet is trying to be ‘smart’ about it and removes ’s'. Carto, however, has two completely different URLs for the two protocols, so the basemap is not loaded.

Chrome loves the new URL when it’s loaded from https (so from github it works perfect), however it will never let you get those maps from Carto to your local machine. I will see if I can tweak the plugin so that it can handle two URLs (http for local, https for secure origins).

JackDougherty avatar Nov 23 '16 18:11 JackDougherty