X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/3d6b28b6662a37ee10491fcd739f7ccdaf56f8db..960d13488a875245570ee498ee9a1ed7cac37bbe:/public/openlayers/OpenStreetMap.js?ds=sidebyside diff --git a/public/openlayers/OpenStreetMap.js b/public/openlayers/OpenStreetMap.js index f472d3fc1..69e8840b2 100644 --- a/public/openlayers/OpenStreetMap.js +++ b/public/openlayers/OpenStreetMap.js @@ -155,6 +155,34 @@ OpenLayers.Layer.OSM.Osmarender = OpenLayers.Class(OpenLayers.Layer.OSM, { CLASS_NAME: "OpenLayers.Layer.OSM.Osmarender" }); +/** + * Class: OpenLayers.Layer.OSM.CycleMap + * + * Inherits from: + * - + */ +OpenLayers.Layer.OSM.CycleMap = OpenLayers.Class(OpenLayers.Layer.OSM, { + /** + * Constructor: OpenLayers.Layer.OSM.CycleMap + * + * Parameters: + * name - {String} + * options - {Object} Hashtable of extra options to tag onto the layer + */ + initialize: function(name, options) { + var url = [ + "http://a.thunderflames.org/tiles/cycle/", + "http://b.thunderflames.org/tiles/cycle/", + "http://c.thunderflames.org/tiles/cycle/" + ]; + options = OpenLayers.Util.extend({ numZoomLevels: 17 }, options); + var newArguments = [name, url, options]; + OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments); + }, + + CLASS_NAME: "OpenLayers.Layer.OSM.CycleMap" +}); + /** * Class: OpenLayers.Layer.OSM.Maplint * @@ -182,19 +210,3 @@ OpenLayers.Layer.OSM.Maplint = OpenLayers.Class(OpenLayers.Layer.OSM, { CLASS_NAME: "OpenLayers.Layer.OSM.Maplint" }); - -OpenLayers.Layer.Data = OpenLayers.Class(OpenLayers.Layer, { - setVisibility: function(vis) { - var oldvis = this.visibility; - OpenLayers.Layer.prototype.setVisibility.apply(this, arguments); - if (!this.map) { return; } - if (vis && !oldvis) { - new Ajax.Request('/browse/start', {asynchronous:true, evalScripts:true}); - } else { - if (this.stopBrowse) { - this.stopBrowse(); - closeSidebar(); - } - } - } -});