protect viewport-lonlat translation functions in the case no baselayer is defined
git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1283 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
+10
-2
@@ -931,7 +931,11 @@ OpenLayers.Map.prototype = {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
getLonLatFromViewPortPx: function (viewPortPx) {
|
getLonLatFromViewPortPx: function (viewPortPx) {
|
||||||
return this.baseLayer.getLonLatFromViewPortPx(viewPortPx);
|
var lonlat = null;
|
||||||
|
if (this.baseLayer != null) {
|
||||||
|
lonlat = this.baseLayer.getLonLatFromViewPortPx(viewPortPx);
|
||||||
|
}
|
||||||
|
return lonlat;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -944,7 +948,11 @@ OpenLayers.Map.prototype = {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
getViewPortPxFromLonLat: function (lonlat) {
|
getViewPortPxFromLonLat: function (lonlat) {
|
||||||
return this.baseLayer.getViewPortPxFromLonLat(lonlat);
|
var px = null;
|
||||||
|
if (this.baseLayer != null) {
|
||||||
|
px = this.baseLayer.getViewPortPxFromLonLat(lonlat);
|
||||||
|
}
|
||||||
|
return px;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user