aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/map-bing-ol.js
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@fury.ukcod.org.uk>2011-03-09 22:21:04 +0000
committerMatthew Somerville <matthew@fury.ukcod.org.uk>2011-03-09 22:21:04 +0000
commitc56f704e998b418aa3f11d5e3b6b86d6c7ce40e6 (patch)
tree4c23b1830e9b6cb35d71413a5387dc6fe367bfad /web/js/map-bing-ol.js
parent6f5bebbb14ec2291ef6b3621f24acffeb9d70a98 (diff)
Fixes to other map types to work with lat/lon. Split OSM JavaScript into core OpenLayers bits and OSM config bit.
Diffstat (limited to 'web/js/map-bing-ol.js')
-rw-r--r--web/js/map-bing-ol.js40
1 files changed, 10 insertions, 30 deletions
diff --git a/web/js/map-bing-ol.js b/web/js/map-bing-ol.js
index ba9445326..047cdff52 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) {