aboutsummaryrefslogtreecommitdiffstats
path: root/phonegap/www/js/map-google.js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-03-12 11:20:08 +0000
committerStruan Donald <struan@exo.org.uk>2012-03-12 12:07:43 +0000
commitd14bdc65777a6347c419f29e355fa9f1745de739 (patch)
treec4bc1cad6ab061d69fd6a58d5dc5b3c44deb79c8 /phonegap/www/js/map-google.js
parent1b15ca0aea334d20fb0f19fed36bc948668e2a14 (diff)
rough initial code for iPhone phonegap app
Diffstat (limited to 'phonegap/www/js/map-google.js')
-rw-r--r--phonegap/www/js/map-google.js22
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);
+ });
+});