Error with example using OpenStreetMap
See original GitHub issueI get this error when trying to load the example using OpenStreetMap. This is the default example. I can get the example to work when using Google.
l.control.geosearch.js:153 XMLHttpRequest cannot load file://nominatim.openstreetmap.org/search?q=12%20galloway%20cres%20ontario&format=json. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.L.Control.GeoSearch.L.Control.extend.sendRequest @ l.control.geosearch.js:153L.Control.GeoSearch.L.Control.extend.geosearch @ l.control.geosearch.js:103L.Control.GeoSearch.L.Control.extend._onKeyUp @ l.control.geosearch.js:233t.(anonymous function).a @ leaflet.js:7
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Report a problem / Fix the map - OpenStreetMap
If you have noticed a problem with our map data, for example a road is missing or your address, the best way to...
Read more >android - Error in using OpenStreetMap - Stack Overflow
I am making an app that shows map offline . So I use OSM but first of all I want to make a...
Read more >Catching mapping errors using OSM Inspector with Dermot
OSM Inspector is an excellent tool for looking at different types of issues with the map that can be fixed. Dermot gives a...
Read more >Error working with OpenStreetMap spatial Data - Posit Cloud
The (example) code provided by the help menu of the openmap() function is: ## Not run: #show some of the maps available nm...
Read more >(PDF) Analysing OpenStreetMap data for topological errors
For cleaning the topological errors, map data has been processed using different algorithms of open source geographic information systems, and ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The file system issue is fixed in the latest version. Let me know if you have any other questions.
That’s because
location.protocol
on line 20 ofl.geosearch.provider.openstreetmap.js
becomes'file'
if you load it by opening a HTML file (from your local filesystem) in a browser.I guess that code has been intended to run always on a web server, never in a file.