mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-04 14:08:13 +02:00
Flash message for no geocoder results
This commit is contained in:
@@ -10,6 +10,11 @@ iD.geocoder = function() {
|
||||
encodeURIComponent(this.value) + '.json', function(err, resp) {
|
||||
if (err) return hide();
|
||||
hide();
|
||||
if (!resp.results.length) {
|
||||
return iD.flash()
|
||||
.select('.content')
|
||||
.text('No location found for "' + resp.query[0] + '"');
|
||||
}
|
||||
map.center([resp.results[0][0].lon, resp.results[0][0].lat]);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user