aboutsummaryrefslogtreecommitdiffstats
path: root/www/js/map-bing.js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2014-10-03 15:07:08 +0100
committerDave Arter <davea@mysociety.org>2015-08-28 14:27:15 +0100
commita69d425c0e5c004145ac1ab70e2f7f9fc329b54c (patch)
tree8eb7ff0ff7aaa0fce8bc7214ec6e15b694fddbdc /www/js/map-bing.js
parent8fd15b58733c51d7f001f9eac66b7d03830ec0b4 (diff)
update Android to Cordova 3.6
Required due to security issue Remove Android directory as no longer required, move src -> www to match standard layout, update .gitignore to avoid including the standard platform files, update README based on Steve's zurich one
Diffstat (limited to 'www/js/map-bing.js')
-rw-r--r--www/js/map-bing.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/www/js/map-bing.js b/www/js/map-bing.js
new file mode 100644
index 0000000..715a8ef
--- /dev/null
+++ b/www/js/map-bing.js
@@ -0,0 +1,22 @@
+$(function(){
+ var centre = new Microsoft.Maps.Location( fixmystreet.latitude, fixmystreet.longitude );
+ var map = new Microsoft.Maps.Map(document.getElementById("map"), {
+ credentials: fixmystreet.key,
+ 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; }
+ });
+});