aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/map-bing.js
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-01-14 12:53:34 +0000
committerMatthew Somerville <matthew@mysociety.org>2011-01-14 12:53:34 +0000
commit6dae847b330b0958442fc89c323a9b3e9a5be240 (patch)
treee948682978bdba3372984f42c2b8a95b0c1b5159 /web/js/map-bing.js
parentaf94672c0cef154b1e0068aa1c9dd0dd58c32fb4 (diff)
parent7f834105f3ec090b7e8827460fee4847a65a03c7 (diff)
Merge branch 'master' into reportemptyhomes
Diffstat (limited to 'web/js/map-bing.js')
-rw-r--r--web/js/map-bing.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/web/js/map-bing.js b/web/js/map-bing.js
new file mode 100644
index 000000000..fbbbcc676
--- /dev/null
+++ b/web/js/map-bing.js
@@ -0,0 +1,21 @@
+YAHOO.util.Event.onContentReady('map', function() {
+ var centre = new Microsoft.Maps.Location( fixmystreet.lat, fixmystreet.lon );
+ var map = new Microsoft.Maps.Map(document.getElementById("map"), {
+ mapTypeId: Microsoft.Maps.MapTypeId.ordnanceSurvey,
+ center: centre,
+ zoom: 15,
+ enableClickableLogo: false,
+ enableSearchLogo: false,
+ showCopyright: false,
+ showDashboard: true,
+ showLogo: false,
+ showScalebar: false
+ });
+ //minZoomLevel: 14,
+ //numZoomLevels: 4
+
+ Microsoft.Maps.Events.addHandler(map, "viewchangestart", function(e) {
+ /* Doesn't work */
+ if (map.getTargetZoom() < 12) return false;
+ });
+});