aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/map-OpenStreetMap.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/js/map-OpenStreetMap.js')
-rw-r--r--web/js/map-OpenStreetMap.js48
1 files changed, 9 insertions, 39 deletions
diff --git a/web/js/map-OpenStreetMap.js b/web/js/map-OpenStreetMap.js
index 54bf95964..fc0afedc3 100644
--- a/web/js/map-OpenStreetMap.js
+++ b/web/js/map-OpenStreetMap.js
@@ -7,8 +7,8 @@ function set_map_config(perm) {
new OpenLayers.Control.ArgParser(),
//new OpenLayers.Control.LayerSwitcher(),
new OpenLayers.Control.Navigation(),
- new OpenLayers.Control.Permalink(permalink_id),
- new OpenLayers.Control.PermalinkFMS('osm_link', 'http://www.openstreetmap.org/'),
+ new OpenLayers.Control.PermalinkFMS(permalink_id),
+ new OpenLayers.Control.PermalinkFMSz('osm_link', 'http://www.openstreetmap.org/'),
new OpenLayers.Control.PanZoomFMS({id: 'fms_pan_zoom' })
];
}
@@ -16,36 +16,6 @@ function set_map_config(perm) {
// http://www.openstreetmap.org/openlayers/OpenStreetMap.js (added maxResolution)
/**
- * Namespace: Util.OSM
- */
-OpenLayers.Util.OSM = {};
-
-/**
- * Constant: MISSING_TILE_URL
- * {String} URL of image to display for missing tiles
- */
-OpenLayers.Util.OSM.MISSING_TILE_URL = "http://www.openstreetmap.org/openlayers/img/404.png";
-
-/**
- * Property: originalOnImageLoadError
- * {Function} Original onImageLoadError function.
- */
-OpenLayers.Util.OSM.originalOnImageLoadError = OpenLayers.Util.onImageLoadError;
-
-/**
- * Function: onImageLoadError
- */
-OpenLayers.Util.onImageLoadError = function() {
- if (this.src.match(/^http:\/\/[abc]\.[a-z]+\.openstreetmap\.org\//)) {
- this.src = OpenLayers.Util.OSM.MISSING_TILE_URL;
- } else if (this.src.match(/^http:\/\/[def]\.tah\.openstreetmap\.org\//)) {
- // do nothing - this layer is transparent
- } else {
- OpenLayers.Util.OSM.originalOnImageLoadError();
- }
-};
-
-/**
* Class: OpenLayers.Layer.OSM.Mapnik
*
* Inherits from:
@@ -67,7 +37,7 @@ OpenLayers.Layer.OSM.Mapnik = OpenLayers.Class(OpenLayers.Layer.OSM, {
];
options = OpenLayers.Util.extend({
/* Below line added to OSM's file in order to allow minimum zoom level */
- maxResolution: 156543.0339/Math.pow(2, options.zoomOffset || 0),
+ maxResolution: 156543.03390625/Math.pow(2, options.zoomOffset || 0),
numZoomLevels: 19,
buffer: 0
}, options);
@@ -94,14 +64,14 @@ OpenLayers.Layer.OSM.MapQuestOpen = OpenLayers.Class(OpenLayers.Layer.OSM, {
*/
initialize: function(name, options) {
var url = [
- "http://otile1.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png",
- "http://otile2.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png",
- "http://otile3.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png",
- "http://otile4.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png"
+ "http://otile1.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png",
+ "http://otile2.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png",
+ "http://otile3.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png",
+ "http://otile4.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png"
];
options = OpenLayers.Util.extend({
/* Below line added to OSM's file in order to allow minimum zoom level */
- maxResolution: 156543.0339/Math.pow(2, options.zoomOffset || 0),
+ maxResolution: 156543.03390625/Math.pow(2, options.zoomOffset || 0),
numZoomLevels: 19,
buffer: 0
}, options);
@@ -134,7 +104,7 @@ OpenLayers.Layer.OSM.CycleMap = OpenLayers.Class(OpenLayers.Layer.OSM, {
];
options = OpenLayers.Util.extend({
/* Below line added to OSM's file in order to allow minimum zoom level */
- maxResolution: 156543.0339/Math.pow(2, options.zoomOffset || 0),
+ maxResolution: 156543.03390625/Math.pow(2, options.zoomOffset || 0),
numZoomLevels: 19,
buffer: 0
}, options);