aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/map-google.js
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@balti.ukcod.org.uk>2010-12-04 00:08:54 +0000
committerMatthew Somerville <matthew@balti.ukcod.org.uk>2010-12-04 00:08:54 +0000
commita4ab584cfc27886373a042f83be3129fde1ccba9 (patch)
treed42ed9d63005081acdd2c62aa458bebd3d478b1c /web/js/map-google.js
parent92c0661cf40f9a8e39613784703bb6b2b9ac8a49 (diff)
Google Maps package.
Diffstat (limited to 'web/js/map-google.js')
-rw-r--r--web/js/map-google.js22
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);
+ });
+});