aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/map-bing-ol.js
diff options
context:
space:
mode:
authorEdmund von der Burg <evdb@mysociety.org>2011-04-04 12:24:03 +0100
committerEdmund von der Burg <evdb@mysociety.org>2011-04-04 12:24:03 +0100
commit8fa7e52025478515203b39f3e7afafb829b60731 (patch)
tree295fb14df87abc4577418cfd294931cc51f7c991 /web/js/map-bing-ol.js
parent689e4c3bd7c7c1cb24ecad3b35a57947bfb7945b (diff)
parente591ef105c5996e95f2e7738b324c25b3708f0be (diff)
Merge branch 'master' into migrate_to_catalyst
Conflicts: .gitignore commonlib conf/packages perllib/FixMyStreet/Map.pm templates/website/cobrands/barnet/footer web/confirm.cgi web/css/core.css web/import.cgi web/index.cgi
Diffstat (limited to 'web/js/map-bing-ol.js')
-rw-r--r--web/js/map-bing-ol.js41
1 files changed, 11 insertions, 30 deletions
diff --git a/web/js/map-bing-ol.js b/web/js/map-bing-ol.js
index ba9445326..254d407f4 100644
--- a/web/js/map-bing-ol.js
+++ b/web/js/map-bing-ol.js
@@ -1,33 +1,13 @@
-YAHOO.util.Event.onContentReady('map', function() {
- var map = new OpenLayers.Map("map", {
- controls: [
- new OpenLayers.Control.ArgParser(),
- //new OpenLayers.Control.LayerSwitcher(),
- new OpenLayers.Control.Navigation(),
- new OpenLayers.Control.PanZoom()
- ],
- displayProjection: new OpenLayers.Projection("EPSG:4326")
- });
- var bing = new OpenLayers.Layer.Bing("", {
- zoomOffset: 13,
- numZoomLevels: 4
- });
- map.addLayer(bing);
-
- var centre = new OpenLayers.LonLat( fixmystreet.easting, fixmystreet.northing );
- centre.transform(
- new OpenLayers.Projection("EPSG:27700"),
- map.getProjectionObject()
- );
- map.setCenter(centre, 3);
-});
-
-OpenLayers.Util.OS = {};
-OpenLayers.Util.OS.MISSING_TILE_URL = "http://openstreetmap.org/openlayers/img/404.png";
-OpenLayers.Util.OS.originalOnImageLoadError = OpenLayers.Util.onImageLoadError;
-OpenLayers.Util.onImageLoadError = function() {
- OpenLayers.Util.OS.originalOnImageLoadError;
-};
+function set_map_config(perm) {
+ fixmystreet.ZOOM_OFFSET = 13;
+ fixmystreet.controls = [
+ new OpenLayers.Control.ArgParser(),
+ new OpenLayers.Control.Navigation(),
+ perm,
+ new OpenLayers.Control.PanZoomFMS()
+ ];
+ fixmystreet.map_type = OpenLayers.Layer.Bing;
+}
OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, {
initialize: function(name, options) {
@@ -38,6 +18,7 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, {
numZoomLevels: 18,
transitionEffect: "resize",
sphericalMercator: true,
+ buffer: 0,
attribution: "© Microsoft / OS 2010"
}, options);
var newArguments = [name, url, options];