special cased inRange() to return true if getResolution() returns null -- this way we get through and actually do load 3rd party layers.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1598 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -89,6 +89,26 @@ OpenLayers.Layer.FixedZoomLevels.prototype = {
|
|||||||
return resolution;
|
return resolution;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/** Overridden from OpenLayers.Layer because if the 3rd party tool has
|
||||||
|
* not been loaded (setcentered) yet, then its translation function
|
||||||
|
* will return null and therefore resolution will be null. In this case
|
||||||
|
* we want to return true so that the redraw will happen.
|
||||||
|
*
|
||||||
|
* @returns Whether or not the layer is displayable at the current map's
|
||||||
|
* current resolution
|
||||||
|
* @type Boolean
|
||||||
|
*/
|
||||||
|
inRange: function() {
|
||||||
|
var inRange = false;
|
||||||
|
if (this.map) {
|
||||||
|
var resolution = this.map.getResolution();
|
||||||
|
inRange = ( (resolution == null) ||
|
||||||
|
( (resolution >= this.minResolution) &&
|
||||||
|
(resolution <= this.maxResolution) ) );
|
||||||
|
}
|
||||||
|
return inRange;
|
||||||
|
},
|
||||||
|
|
||||||
/** Calculates using px-> lonlat translation functions on tl and br
|
/** Calculates using px-> lonlat translation functions on tl and br
|
||||||
* corners of viewport
|
* corners of viewport
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user