question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error with example using OpenStreetMap

See original GitHub issue

I 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:closed
  • Created 8 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
smeijercommented, Mar 23, 2016

The file system issue is fixed in the latest version. Let me know if you have any other questions.

1reaction
Mithgolcommented, Mar 20, 2016

That’s because location.protocol on line 20 of l.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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found