diff options
author | Matthew Somerville <matthew@mysociety.org> | 2015-01-16 17:19:17 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2015-01-19 17:46:29 +0000 |
commit | ec470c609e438892c28c69ba07cf81ea17c74f17 (patch) | |
tree | 8d91f1e3784fa7d1fb08f1c15438a1b68ff1bbc9 /web | |
parent | 21c8fded9bfd34c456f5202bc812408152f3b6cf (diff) |
Add Hybrid map toggle option to Google Maps view.
Diffstat (limited to 'web')
-rw-r--r-- | web/js/map-google-ol.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/web/js/map-google-ol.js b/web/js/map-google-ol.js index 953765068..5d128a7bd 100644 --- a/web/js/map-google-ol.js +++ b/web/js/map-google-ol.js @@ -1,3 +1,13 @@ +$(function(){ + $('#map_layer_toggle').toggle(function(){ + $(this).text(translation_strings.map_map); + fixmystreet.map.setBaseLayer(fixmystreet.map.layers[1]); + }, function(){ + $(this).text(translation_strings.map_satellite); + fixmystreet.map.setBaseLayer(fixmystreet.map.layers[0]); + }); +}); + function set_map_config(perm) { var permalink_id; if ($('#map_permalink').length) { @@ -15,5 +25,9 @@ function set_map_config(perm) { fixmystreet.map_options = { zoomDuration: 10 }; + fixmystreet.layer_options = [ + {}, + { type: google.maps.MapTypeId.HYBRID } + ]; } |