diff options
author | Struan Donald <struan@exo.org.uk> | 2012-06-15 12:23:54 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-06-15 12:23:54 +0100 |
commit | cc1aa4a6676db38eabed168327941c6aa93b4654 (patch) | |
tree | a7848a02a53b88e89450de4fd187e7939fb61e80 /phonegap/www/js/map-google.js | |
parent | 3a25a77b31e955ae6db9f7bd22120ef421aa5d92 (diff) | |
parent | d0c522739862671cc0ffa5cc1611d3772fe732bd (diff) |
Merge branch 'phonegap'
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..742b55d47 --- /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); + }); +}); |