Closed gamecubate closed 8 years ago
Latest Firefox is affected too.
In Chrome 43.0.2357.124 I see an error in the console, but the UI appears to be correct and complete. The error is:
Font from origin 'https://api.tiles.mapbox.com' has been blocked from loading by Cross-Origin Resource Sharing policy: The 'Access-Control-Allow-Origin' header contains multiple values ', ', but only one is allowed. Origin 'https://www.mapbox.com' is therefore not allowed access.
The request that it's complaining about is https://api.tiles.mapbox.com/mapbox.js/plugins/leaflet-locatecontrol/v0.43.0/fonts/fontawesome-webfont.woff2?v=4.3.0, which has the following headers:
Access-Control-Allow-Methods:GET
Access-Control-Allow-Methods:GET
Access-Control-Allow-Origin:*
Access-Control-Allow-Origin:*
This has been fixed on the CDN.
The leaflet locate control plugin does not work in Chrome (not tested in other browsers) because of multiple cross-site access denial. This issue was reported on the developer's page (https://github.com/domoritz/leaflet-locatecontrol/issues/125#issuecomment-114729166). He then suggested I report the issue here.
To reproduce:
Note: the sample code per current mapbox docs is as follows: