diff --git a/js/id/ui/geocoder.js b/js/id/ui/geocoder.js index a744f92b2..b3372b899 100644 --- a/js/id/ui/geocoder.js +++ b/js/id/ui/geocoder.js @@ -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]); }); }