Since popups have a reference back to map, allow them to determine where they should be drawn internally. Thus we can remove the computing from the addPopup() function in Map.js.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@346 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-05-25 02:09:33 +00:00
parent ec397fa9cf
commit df5455e41e
3 changed files with 8 additions and 2 deletions

View File

@@ -81,6 +81,10 @@ OpenLayers.Popup.prototype = {
* @type DOMElement
*/
draw: function(px) {
if ((px == null) && (this.map != null)) {
px = this.map.getLayerPxFromLonLat(this.lonlat);
}
if (this.div == null) {
this.div = OpenLayers.Util.createDiv(this.id + "_div",
null,