Only render overlays if the map is rendered

This commit is contained in:
Tom Payne
2014-02-20 19:56:42 +01:00
parent 443e7d9a8c
commit c4786304b7

View File

@@ -327,7 +327,7 @@ ol.Overlay.prototype.updatePixelPosition_ = function() {
var map = this.getMap();
var position = this.getPosition();
if (!goog.isDef(map) || !map.isDef() || !goog.isDef(position)) {
if (!goog.isDef(map) || !map.isRendered() || !goog.isDef(position)) {
if (this.rendered_.visible) {
goog.style.setElementShown(this.element_, false);
this.rendered_.visible = false;