coding standards. 79 char limit on lines. no 4unctional di44erences here.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@4184 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2007-09-04 10:28:16 +00:00
parent b92e372f49
commit b58afacb96
+22 -20
View File
@@ -75,8 +75,9 @@ OpenLayers.Layer = OpenLayers.Class({
/** /**
* Property: inRange * Property: inRange
* {Boolean} The current map resolution is within the layer's min/max range. * {Boolean} The current map resolution is within the layer's min/max
* This is set in <OpenLayers.Map.setCenter> whenever the zoom changes. * range. This is set in <OpenLayers.Map.setCenter> whenever the zoom
* changes.
*/ */
inRange: false, inRange: false,
@@ -201,8 +202,8 @@ OpenLayers.Layer = OpenLayers.Class({
/** /**
* APIProperty: displayOutsideMaxExtent * APIProperty: displayOutsideMaxExtent
* {Boolean} Request map tiles that are completely outside of the max extent * {Boolean} Request map tiles that are completely outside of the max
* for this layer. Defaults to false. * extent for this layer. Defaults to false.
*/ */
displayOutsideMaxExtent: false, displayOutsideMaxExtent: false,
@@ -388,8 +389,8 @@ OpenLayers.Layer = OpenLayers.Class({
* so that subclasses can override this and take special action once * so that subclasses can override this and take special action once
* they have their map variable set. * they have their map variable set.
* *
* Here we take care to bring over any of the necessary default properties * Here we take care to bring over any of the necessary default
* from the map. * properties from the map.
* *
* Parameters: * Parameters:
* map - {<OpenLayers.Map>} * map - {<OpenLayers.Map>}
@@ -459,15 +460,16 @@ OpenLayers.Layer = OpenLayers.Class({
this.map.getTileSize()); this.map.getTileSize());
this.tileSize = tileSize; this.tileSize = tileSize;
if(this.gutter) { if(this.gutter) {
// layers with gutters need non-null tile sizes // layers with gutters need non-null tile sizes
//if(tileSize == null) { //if(tileSize == null) {
// OpenLayers.console.error("Error in layer.setMap() for " + // OpenLayers.console.error("Error in layer.setMap() for " +
// this.name + ": layers with gutters " + // this.name + ": layers with " +
// "need non-null tile sizes"); // "gutters need non-null tile sizes");
//} //}
this.imageOffset = new OpenLayers.Pixel(-this.gutter, -this.gutter); this.imageOffset = new OpenLayers.Pixel(-this.gutter,
this.imageSize = new OpenLayers.Size(tileSize.w + (2 * this.gutter), -this.gutter);
tileSize.h + (2 * this.gutter)); this.imageSize = new OpenLayers.Size(tileSize.w + (2*this.gutter),
tileSize.h + (2*this.gutter));
} }
}, },
@@ -483,8 +485,8 @@ OpenLayers.Layer = OpenLayers.Class({
/** /**
* APIMethod: setVisibility * APIMethod: setVisibility
* Set the visibility flag for the layer and hide/show & redraw accordingly. * Set the visibility flag for the layer and hide/show & redraw
* Fire event unless otherwise specified * accordingly. Fire event unless otherwise specified
* *
* Note that visibility is no longer simply whether or not the layer's * Note that visibility is no longer simply whether or not the layer's
* style.display is set to "block". Now we store a 'visibility' state * style.display is set to "block". Now we store a 'visibility' state
@@ -820,9 +822,9 @@ OpenLayers.Layer = OpenLayers.Class({
var resolution = this.map.getResolution(); var resolution = this.map.getResolution();
var extent = this.map.getExtent(); var extent = this.map.getExtent();
px = new OpenLayers.Pixel( px = new OpenLayers.Pixel(
Math.round(1/resolution * (lonlat.lon - extent.left)), Math.round(1/resolution * (lonlat.lon - extent.left)),
Math.round(1/resolution * (extent.top - lonlat.lat)) Math.round(1/resolution * (extent.top - lonlat.lat))
); );
} }
return px; return px;
}, },