Add map.extent and use in geocoder

This commit is contained in:
Ansis Brammanis
2013-01-14 15:36:52 -05:00
parent 72afc6dcb9
commit a0072bfa18
2 changed files with 23 additions and 3 deletions
+2 -1
View File
@@ -15,7 +15,8 @@ iD.ui.geocoder = function() {
.select('.content')
.text('No location found for "' + resp.query[0] + '"');
}
map.center([resp.results[0][0].lon, resp.results[0][0].lat]);
var bounds = resp.results[0][0].bounds;
map.extent([bounds[0], bounds[3]], [bounds[2], bounds[1]]);
});
}