aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/map-OpenLayers.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/js/map-OpenLayers.js')
-rw-r--r--web/js/map-OpenLayers.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index f11ae3ed9..7ffdc7f34 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -83,7 +83,10 @@ function fixmystreet_onload() {
var bounds = area.getDataExtent();
if (bounds) {
var center = bounds.getCenterLonLat();
- fixmystreet.map.setCenter(center, fixmystreet.map.getZoomForExtent(bounds), false, true);
+ var z = fixmystreet.map.getZoomForExtent(bounds);
+ if ( z >= 13 || !$('html').hasClass('mobile') ) {
+ fixmystreet.map.setCenter(center, z, false, true);
+ }
}
});
}
@@ -178,7 +181,12 @@ function fixmystreet_onload() {
if ( fixmystreet.zoomToBounds ) {
var bounds = fixmystreet.markers.getDataExtent();
- if (bounds) { fixmystreet.map.zoomToExtent( bounds ); }
+ if (bounds) {
+ var z = fixmystreet.map.getZoomForExtent(bounds);
+ if ( z >= 13 || !$('html').hasClass('mobile') ) {
+ fixmystreet.map.zoomToExtent( bounds );
+ }
+ }
}
$('#hide_pins_link').click(function(e) {