map renderer should not render if map is not defined
This commit is contained in:
@@ -96,6 +96,10 @@ ol.dom.MapRenderer.prototype.createLayerRenderer = function(layer) {
|
|||||||
*/
|
*/
|
||||||
ol.dom.MapRenderer.prototype.handleCenterChanged = function() {
|
ol.dom.MapRenderer.prototype.handleCenterChanged = function() {
|
||||||
goog.base(this, 'handleCenterChanged');
|
goog.base(this, 'handleCenterChanged');
|
||||||
|
var map = this.getMap();
|
||||||
|
if (!map.isDef()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// FIXME: shiftLayersPane_ and resetLayersPane_ should be called
|
// FIXME: shiftLayersPane_ and resetLayersPane_ should be called
|
||||||
// elsewhere as we may be frozen here
|
// elsewhere as we may be frozen here
|
||||||
if (goog.isDef(this.renderedCenter_)) {
|
if (goog.isDef(this.renderedCenter_)) {
|
||||||
@@ -112,6 +116,10 @@ ol.dom.MapRenderer.prototype.handleCenterChanged = function() {
|
|||||||
*/
|
*/
|
||||||
ol.dom.MapRenderer.prototype.handleResolutionChanged = function() {
|
ol.dom.MapRenderer.prototype.handleResolutionChanged = function() {
|
||||||
goog.base(this, 'handleResolutionChanged');
|
goog.base(this, 'handleResolutionChanged');
|
||||||
|
var map = this.getMap();
|
||||||
|
if (!map.isDef()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// FIXME: resetLayersPane_ should be called
|
// FIXME: resetLayersPane_ should be called
|
||||||
// elsewhere as we may be frozen here
|
// elsewhere as we may be frozen here
|
||||||
this.resetLayersPane_();
|
this.resetLayersPane_();
|
||||||
|
|||||||
Reference in New Issue
Block a user