aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/map-google-ol.js
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2015-01-26 18:13:55 +0100
committerMarius Halden <marius.h@lden.org>2015-01-26 18:13:55 +0100
commit1c5c685d0b0904e7ddc6e764e58e8fae08632d1d (patch)
tree559d5fddb743c1c083e23c9a3831efea92a240cb /web/js/map-google-ol.js
parent84de1b811a219c41adbdcc8b65851320a77e98f7 (diff)
parent04117b8be30b5d82d50cdc047ac4e7c19864f8ed (diff)
Merge tag 'v1.5.3' into fiksgatami-dev
Diffstat (limited to 'web/js/map-google-ol.js')
-rw-r--r--web/js/map-google-ol.js14
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 }
+ ];
}