new layerswitcher, improved google layer, boxes layer, grid fix

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1096 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-08-08 18:20:24 +00:00
parent 138d22af3f
commit f3a072b151
38 changed files with 1474 additions and 353 deletions
+25 -20
View File
@@ -22,7 +22,14 @@ OpenLayers.Layer.prototype = {
* @type OpenLayers.Map */
map: null,
/** Whether or not the layer is a base layer. This should be set
* individually by all subclasses.
* Default is false
*
* @type Boolean
*/
isBaseLayer: false,
// OPTIONS
/** @type Array */
@@ -135,6 +142,12 @@ OpenLayers.Layer.prototype = {
moveTo:function(bounds, zoomChanged, minor) {
//this function can be implemented by subclasses.
},
/**
*/
reproject:function() {
//this function can be implemented by subclasses.
},
/** Set the map property for the layer. This is done through an accessor
* so that subclasses can override this and take special action once
@@ -146,16 +159,6 @@ OpenLayers.Layer.prototype = {
this.map = map;
},
/**
* @returns Whether or not the layer is a base layer. This should be
* determined individually by all subclasses. Default is false
* @type Boolean
*/
isBaseLayer: function() {
//this function should be implemented by all subclasses.
return false;
},
/**
* @returns Whether or not the layer is visible
* @type Boolean
@@ -165,18 +168,20 @@ OpenLayers.Layer.prototype = {
},
/**
* @param {bool} visible
*/
setVisibility: function(visible) {
* @param {Boolean} visible
* @param {Boolean} noEvent
*/
setVisibility: function(visible, noEvent) {
if (visible != this.getVisibility()) {
this.div.style.display = (visible) ? "block" : "none";
if (this.map != null) {
if (visible) {
var extent = this.map.getExtent();
if (extent != null) {
this.moveTo(this.map.getExtent());
}
if ((visible) && (this.map != null)) {
var extent = this.map.getExtent();
if (extent != null) {
this.moveTo(this.map.getExtent());
}
}
if ((this.map != null) &&
((noEvent == null) || (noEvent == false))) {
this.map.events.triggerEvent("changelayer");
}
}