we should really be sure that this.lonlat is set too.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@348 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -81,8 +81,10 @@ OpenLayers.Popup.prototype = {
|
|||||||
* @type DOMElement
|
* @type DOMElement
|
||||||
*/
|
*/
|
||||||
draw: function(px) {
|
draw: function(px) {
|
||||||
if ((px == null) && (this.map != null)) {
|
if (px == null) {
|
||||||
px = this.map.getLayerPxFromLonLat(this.lonlat);
|
if ((this.lonlat != null) && (this.map != null)) {
|
||||||
|
px = this.map.getLayerPxFromLonLat(this.lonlat);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.div == null) {
|
if (this.div == null) {
|
||||||
|
|||||||
@@ -39,8 +39,10 @@ OpenLayers.Popup.Anchored.prototype =
|
|||||||
* @type DOMElement
|
* @type DOMElement
|
||||||
*/
|
*/
|
||||||
draw: function(px) {
|
draw: function(px) {
|
||||||
if ((px == null) && (this.map != null)) {
|
if (px == null) {
|
||||||
px = this.map.getLayerPxFromLonLat(this.lonlat);
|
if ((this.lonlat != null) && (this.map != null)) {
|
||||||
|
px = this.map.getLayerPxFromLonLat(this.lonlat);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//calculate relative position
|
//calculate relative position
|
||||||
|
|||||||
Reference in New Issue
Block a user