aboutsummaryrefslogtreecommitdiffstats
path: root/web/js
diff options
context:
space:
mode:
Diffstat (limited to 'web/js')
-rw-r--r--web/js/map-OpenLayers.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index 89c862847..3d2d3259a 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -54,7 +54,10 @@ function fixmystreet_onload() {
fixmystreet.map.addLayer(area);
area.events.register('loadend', null, function(a,b,c) {
var bounds = area.getDataExtent();
- if (bounds) { fixmystreet.map.zoomToExtent( bounds ); }
+ if (bounds) {
+ var center = bounds.getCenterLonLat();
+ fixmystreet.map.setCenter(center, fixmystreet.map.getZoomForExtent(bounds), false, true);
+ }
});
}