diff options
Diffstat (limited to 'web/js')
-rw-r--r-- | web/js/map-bing-ol.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/web/js/map-bing-ol.js b/web/js/map-bing-ol.js index a329c4235..b0e5dfc6a 100644 --- a/web/js/map-bing-ol.js +++ b/web/js/map-bing-ol.js @@ -14,8 +14,16 @@ fixmystreet.maps.config = function() { (function() { $(function(){ - $(this).text(translation_strings.map_roads); - $(this).text(translation_strings.map_aerial); + $('#map_layer_toggle').click(function(e) { + e.preventDefault(); + var $this = $(this); + if ($this.text() == translation_strings.map_aerial) { + $this.text(translation_strings.map_roads); + fixmystreet.map.setBaseLayer(fixmystreet.map.layers[1]); + } else { + $this.text(translation_strings.map_aerial); + fixmystreet.map.setBaseLayer(fixmystreet.map.layers[0]); + } }); }); })(); |