diff --git a/js/id/ui/geocoder.js b/js/id/ui/geocoder.js index 35b68dd9d..1f11f3e11 100644 --- a/js/id/ui/geocoder.js +++ b/js/id/ui/geocoder.js @@ -6,8 +6,9 @@ iD.geocoder = function() { function keydown() { if (d3.event.keyCode !== 13) return; d3.event.preventDefault(); - d3.json('http://api.tiles.mapbox.com/v3/mapbox/geocode/' + + d3.json('http://api.tiles.mapbox.com/v3/openstreetmap.map-hn253zqn/geocode/' + encodeURIComponent(this.value) + '.json', function(err, resp) { + if (err) return hide(); hide(); map.center([resp.results[0][0].lon, resp.results[0][0].lat]); });