diff options
-rw-r--r-- | templates/web/fixmystreet/header.html | 2 | ||||
-rw-r--r-- | web/cobrands/fixmystreet/fixmystreet.js | 18 | ||||
-rw-r--r-- | web/js/map-OpenLayers.js | 8 |
3 files changed, 24 insertions, 4 deletions
diff --git a/templates/web/fixmystreet/header.html b/templates/web/fixmystreet/header.html index 3bd42b1b2..878118afc 100644 --- a/templates/web/fixmystreet/header.html +++ b/templates/web/fixmystreet/header.html @@ -7,8 +7,6 @@ <head> <meta name="viewport" content="initial-scale=1.0"> - <meta name="apple-mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta name="HandHeldFriendly" content="true"> <meta name="mobileoptimized" content="0"> diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js index cdf1c6af7..39ab7b2b4 100644 --- a/web/cobrands/fixmystreet/fixmystreet.js +++ b/web/cobrands/fixmystreet/fixmystreet.js @@ -84,7 +84,9 @@ $(function(){ // Immediately go full screen map if on around page $('#site-header').hide(); $('#map_box').prependTo('.wrapper').css({ - height: $(window).height(), + position: 'absolute', + top: 0, left: 0, right: 0, bottom: 0, + height: 'auto', margin: 0 }); $('.big-green-banner') @@ -371,3 +373,17 @@ $(function(){ } }); }); + +/* +XXX Disabled because jerky on Android and makes map URL bar height too small on iPhone. +// Hide URL bar +$(window).load(function(){ + window.setTimeout(function(){ + var s = window.pageYOffset || document.compatMode === "CSS1Compat" && document.documentElement.scrollTop || document.body.scrollTop || 0; + if (s < 20 && !location.hash) { + window.scrollTo(0, 1); + } + }, 0); +}); +*/ + diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js index 2328fc6a3..4c789cc19 100644 --- a/web/js/map-OpenLayers.js +++ b/web/js/map-OpenLayers.js @@ -134,7 +134,8 @@ function fixmystreet_onload() { feature.geometry.getBounds().getCenterLonLat(), null, feature.attributes.title + "<br><a href=/report/" + feature.attributes.id + ">More details</a>", - null, true, onPopupClose); + { size: new OpenLayers.Size(0,0), offset: new OpenLayers.Pixel(0,-40) }, + true, onPopupClose); feature.popup = popup; fixmystreet.map.addPopup(popup); }); @@ -262,6 +263,10 @@ $(function(){ // Okay, back to around view. fixmystreet.bbox_strategy.activate(); fixmystreet.markers.refresh( { force: true } ); + if ( fixmystreet.state_pins_were_hidden ) { + // If we had pins hidden when we clicked map (which had to show the pin layer as I'm doing it in one layer), hide them again. + $('#hide_pins_link').click(); + } fixmystreet.drag.deactivate(); $('#side-form').hide(); $('#side').show(); @@ -398,6 +403,7 @@ OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, { // link so that it updates the text in case they go // back if ( ! fixmystreet.markers.getVisibility() ) { + fixmystreet.state_pins_were_hidden = true; $('#hide_pins_link').click(); } if (fixmystreet.page == 'new') { |