Skip to content

Commit a454aa3

Browse files
committed
fix nominatim API search syntax
see osm-search/Nominatim#3134
1 parent 0199f96 commit a454aa3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

modules/services/nominatim.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,12 @@ export default {
8181

8282

8383
search: function (val, callback) {
84-
var searchVal = encodeURIComponent(val);
85-
var url = apibase + 'search/' + searchVal + '?limit=10&format=json';
84+
const params = {
85+
q: val,
86+
limit:10,
87+
format: 'json'
88+
};
89+
var url = apibase + 'search?' + utilQsString(params);
8690

8791
if (_inflight[url]) return;
8892
var controller = new AbortController();

0 commit comments

Comments
 (0)