X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/0d60c397217218dabb439a8c38cb4c84261da693..2b35dadd5f5039d44810c722d3e0dbc5557862c1:/public/javascripts/map.js diff --git a/public/javascripts/map.js b/public/javascripts/map.js index c0fd4bbd6..4a23d8590 100644 --- a/public/javascripts/map.js +++ b/public/javascripts/map.js @@ -5,19 +5,21 @@ var popup; OpenLayers._getScriptLocation = function () { return "/openlayers/"; } - + function createMap(divName) { map = new OpenLayers.Map(divName, { controls: [ - new OpenLayers.Control.ArgParser(), + new OpenLayers.Control.ArgParser(), new OpenLayers.Control.Attribution(), new OpenLayers.Control.LayerSwitcher(), - new OpenLayers.Control.Navigation(), - new OpenLayers.Control.PanZoomBar() - ] + new OpenLayers.Control.Navigation(), + new OpenLayers.Control.PanZoomBar(), + new OpenLayers.Control.ScaleLine() + ], + units: "m" }); - var mapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik", { + var mapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik", { displayOutsideMaxExtent: true, wrapDateLine: true }); @@ -29,20 +31,14 @@ function createMap(divName) { }); map.addLayer(osmarender); - var mapnik_local = new OpenLayers.Layer.OSM("Mapnik (Local)", "http://bericote.uk.cyberscience.com/tiles/", { - displayOutsideMaxExtent: true, - wrapDateLine: true - }); - map.addLayer(mapnik_local); - - var maplint = new OpenLayers.Layer.OSM.Maplint("Maplint", { + var maplint = new OpenLayers.Layer.OSM.Maplint("Maplint", { displayOutsideMaxExtent: true, wrapDateLine: true }); map.addLayer(maplint); var numZoomLevels = Math.max(mapnik.numZoomLevels, osmarender.numZoomLevels); - markers = new OpenLayers.Layer.Markers("Markers", { + markers = new OpenLayers.Layer.Markers("Markers", { displayInLayerSwitcher: false, numZoomLevels: numZoomLevels, maxExtent: new OpenLayers.Bounds(-20037508,-20037508,20037508,20037508),