Closed svbatalov closed 1 year ago
Created PR #322 that should fix this.
So, hacking around a bit with this code and the PR this last day or two. The PR does stop the error, but the search results produce an "undefined" result in the search box. I've tested this by changing the source code on the example online as well as my personal project.
If it's any help, this is the request URL: https://nominatim.openstreetmap.org/search?format=json&q=London&json_callback=L.Control.Search.callJsonp
And this is the response:
L.Control.Search.callJsonp([{
"place_id": 344385499,
"licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
"osm_type": "relation",
"osm_id": 65606,
"boundingbox": ["51.2867601", "51.6918741", "-0.5103751", "0.3340155"],
"lat": "51.5073359",
"lon": "-0.12765",
"display_name": "London, Greater London, England, United Kingdom",
"class": "place",
"type": "city",
"importance": 0.9407827616237295,
"icon": "https://nominatim.openstreetmap.org/ui/mapicons/poi_place_city.p.20.png"
}])
Hello.
I query OSM Nominatim API via JSONP callback. Few months ago it stopped working -- whenever I try to search something, the following error is thrown:
After some investigation it turns out that recent versions call
_retrieveData
directly instead of usingthis._retrieveData.call(...)
, as it was before. So instead of 2 arguments (inputText and callback) the function is called with three, soinputText = this
andcallback = inputText
.