aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/map-google-ol.js
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2015-07-10 12:49:29 +0100
committerMatthew Somerville <matthew@mysociety.org>2015-12-05 21:21:01 +0000
commit1009dae7ad83d830c19a82a8d938c5b1d40546aa (patch)
tree1ea51029905f648a34bd810aa0e37de4e28f6a09 /web/js/map-google-ol.js
parent552805bd5653504a6795ce024d5c40a8a5a44bf3 (diff)
Default the Google map view to hybrid (again).
A repeat of cc6a278; Google have now dropped version 3.20 of their Maps API, which we were using. Version 3.21 is the oldest available version, and only appears to work if you start off in hybrid view. According to https://developers.google.com/maps/documentation/javascript/versions, in three months 3.21 will be dropped; 3.22 does not currently work with our OpenLayers code at all. Looking at http://dev.openlayers.org/releases/OpenLayers-2.13.1/examples/google-v3.html the maps do still appear if you first switch to the Satellite layer. So investigation will be needed to find out why that happens and if it can be worked around.
Diffstat (limited to 'web/js/map-google-ol.js')
-rw-r--r--web/js/map-google-ol.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/web/js/map-google-ol.js b/web/js/map-google-ol.js
index 5a1aa3c57..9de479ce3 100644
--- a/web/js/map-google-ol.js
+++ b/web/js/map-google-ol.js
@@ -4,13 +4,13 @@ $(function(){
var $t = $(this), text = $t.text();
if (text == translation_strings.map_map) {
$t.text(translation_strings.map_satellite);
- fixmystreet.map.setBaseLayer(fixmystreet.map.layers[0]);
+ fixmystreet.map.setBaseLayer(fixmystreet.map.layers[1]);
} else {
$t.text(translation_strings.map_map);
- fixmystreet.map.setBaseLayer(fixmystreet.map.layers[1]);
+ fixmystreet.map.setBaseLayer(fixmystreet.map.layers[0]);
}
});
- if (typeof fixmystreet_google_default !== 'undefined' && fixmystreet_google_default == 'satellite') {
+ if (typeof fixmystreet_google_default !== 'undefined' && fixmystreet_google_default == 'map') {
$('#map_layer_toggle').click();
}
});
@@ -34,8 +34,8 @@ function set_map_config(perm) {
};
fixmystreet.layer_options = [
- {},
- { type: google.maps.MapTypeId.HYBRID }
+ { type: google.maps.MapTypeId.HYBRID },
+ {}
];
}