+
+/**
+ * Class: OpenLayers.Layer.OSM.Maplint
+ *
+ * Inherits from:
+ * - <OpenLayers.Layer.OSM>
+ */
+OpenLayers.Layer.OSM.Maplint = OpenLayers.Class(OpenLayers.Layer.OSM, {
+ /**
+ * Constructor: OpenLayers.Layer.OSM.Maplint
+ *
+ * Parameters:
+ * name - {String}
+ * options - {Object} Hashtable of extra options to tag onto the layer
+ */
+ initialize: function(name, options) {
+ var url = [
+ "http://d.tah.openstreetmap.org/Tiles/maplint.php/",
+ "http://e.tah.openstreetmap.org/Tiles/maplint.php/",
+ "http://f.tah.openstreetmap.org/Tiles/maplint.php/"
+ ];
+ options = OpenLayers.Util.extend({ numZoomLevels: 18, isBaseLayer: false, visibility: false }, options);
+ var newArguments = [name, url, options];
+ OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments);
+ },
+
+ 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();
+ }
+ }
+ }
+});