diff options
author | Dave Whiteland <dave@mysociety.org> | 2012-06-25 14:33:57 +0100 |
---|---|---|
committer | Dave Whiteland <dave@mysociety.org> | 2012-06-25 14:33:57 +0100 |
commit | f9fe02f91ac72ea2954ee68a5f32d96a237fcd67 (patch) | |
tree | f91d63ab3d6b9cd3555587090a541c870ecd3363 /phonegap/www/js/map-google.js | |
parent | 67da8efc720d2d0bd22bd9fe8655b7e983b35bb4 (diff) | |
parent | 45b3040884d7089e7d8c6f4acccd657b91c92a04 (diff) |
Merge branch 'master' into fmb-read-only
Conflicts:
.gitignore
bin/make_css
perllib/FixMyStreet/Cobrand/FixMyStreet.pm
Diffstat (limited to 'phonegap/www/js/map-google.js')
-rw-r--r-- | phonegap/www/js/map-google.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/phonegap/www/js/map-google.js b/phonegap/www/js/map-google.js new file mode 100644 index 000000000..7da21ba09 --- /dev/null +++ b/phonegap/www/js/map-google.js @@ -0,0 +1,22 @@ +$(function(){ + var centre = new google.maps.LatLng( fixmystreet.latitude, fixmystreet.longitude ); + var map = new google.maps.Map(document.getElementById("map"), { + mapTypeId: google.maps.MapTypeId.ROADMAP, + center: centre, + zoom: 16, + disableDefaultUI: true, + navigationControl: true, + navigationControlOptions: { + style: google.maps.NavigationControlStyle.SMALL + }, + mapTypeControl: true, + mapTypeControlOptions: { + style: google.maps.MapTypeControlStyle.DROPDOWN_MENU + } + }); + + google.maps.event.addListener(map, "zoom_changed", function() { + if (map.getZoom() < 13) { map.setZoom(13); } + if (map.getZoom() > 17) { map.setZoom(17); } + }); +}); |