diff options
author | Josh Angell <josh@supercooldesign.co.uk> | 2012-03-01 15:56:54 +0000 |
---|---|---|
committer | Josh Angell <josh@supercooldesign.co.uk> | 2012-03-01 15:56:54 +0000 |
commit | 268da99e06dfecf466eda733b9b3094aa6186787 (patch) | |
tree | 4f6924eb85c8228b121fd80f43310d9bfbe273f5 /web/js/map-OpenLayers.js | |
parent | 0b06d212c635a6696c41e339e56b1e0c058f10a1 (diff) | |
parent | f00eaa221cdefd6d2d70c8c2029df801bc0d0420 (diff) |
Merge branch 'supercool' of ssh://github.com/mysociety/fixmystreet into supercool
Diffstat (limited to 'web/js/map-OpenLayers.js')
-rw-r--r-- | web/js/map-OpenLayers.js | 8 |
1 files changed, 7 insertions, 1 deletions
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') { |