Prevent popups from failing when getLayerPxFromLonLat returns null (which is possible
in the case of a not-yet-setup layer, for example). git-svn-id: http://svn.openlayers.org/trunk/openlayers@4251 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -226,7 +226,9 @@ OpenLayers.Popup = OpenLayers.Class({
|
||||
updatePosition: function() {
|
||||
if ((this.lonlat) && (this.map)) {
|
||||
var px = this.map.getLayerPxFromLonLat(this.lonlat);
|
||||
this.moveTo(px);
|
||||
if (px) {
|
||||
this.moveTo(px);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user