diff options
author | Matthew Somerville <matthew@mysociety.org> | 2010-12-22 16:38:37 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2010-12-22 16:38:37 +0000 |
commit | a1f9b9d2422f4b14f79ed40fbd70f18510dfedf2 (patch) | |
tree | c675a4d916d684fde8085fda4c3a53ceb75b7166 /web/js/map-google.js | |
parent | 74a45e725dc529af5dc8a677153f65588d6f8a2a (diff) | |
parent | 7acf747fe181d2e63499e80f235dc1a4ecd5098e (diff) |
Merge branch 'master' into cities_release_1
Diffstat (limited to 'web/js/map-google.js')
-rw-r--r-- | web/js/map-google.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/web/js/map-google.js b/web/js/map-google.js new file mode 100644 index 000000000..77e54ab7c --- /dev/null +++ b/web/js/map-google.js @@ -0,0 +1,22 @@ +YAHOO.util.Event.onContentReady('map', function() { + var centre = new google.maps.LatLng( fixmystreet.lat, fixmystreet.lon ); + 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); + }); +}); |