Thanks a lot Phil, much appreciated. Still getting freezing of the
windows on zooms and drags (especially those popups with more content),
but the global scope of "popup" and the remove routine at the start of
the onFeatureSelect function do a pretty satisfactory job of keeping
things more tidy. 
Cheers,
Iain 



On Wed, 2010-11-17 at 10:51 +1300, Phil Scadden wrote:
> I'm late to party on this one, but I had same problem.
> 
> First - declare popup at top of js so its scope is global.
> 
> Inside, the onselect I have:
>                  if (popup) {
>                    map.removePopup(popup);
>                    popup = null;
>                  }
>                  popup = new OpenLayers.Popup.FramedCloud("chicken",
>                                           
> feature.geometry.getBounds().getCenterLonLat(),
>                                           new OpenLayers.Size(100,100),
>                                           content,
>                                           null, true, onPopupClose);
>                  feature.popup = popup;
>                  map.addPopup(popup);
> 
> 
> unselect code is:
>              var feature = event.feature;
>              if(feature.popup) {
>                  map.removePopup(feature.popup);
>                  feature.popup.destroy();
>                  delete feature.popup;
>                  popup = null;
>              }
> 
> 


_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to