Re: [OpenLayers-Users] Pop is not closing while Zooming

2009-08-20 Thread Ivan Grcic
On Thu, Aug 20, 2009 at 7:31 AM, Kris Geusebroek wrote:
> Hi,
>
>
>
> You probably lose the connection with the feature. Popup is registered with
> the feature and if the feature is not there anymore ….
>
Yes, popup is "connected" with feature, and if you are using some
strategy that fetches new data as map is moved, new features are
loaded. Unfortunately if there are features that are selected, they
dont get unselected before removing them from the layer. (i might open
a ticket for this)

Best way is to close popup (or deselect feature if you registered
popup close onUnselect callback) before loading new features.
Something like:

WFSlayer.events.register('loadstart', WFSlayer, function (evt){

if(selectedFeature && selectedFeature.popup){
map.removePopup(selectedFeature.popup);
selectedFeature.popup.destroy();
selectedFeature.popup = null;
}
});

hope it helps,
cheers

> Best way is to register a function that closes the popup at layer unload
>
>
>
> Cheers Kris
>
>
>
> From: users-boun...@openlayers.org [mailto:users-boun...@openlayers.org] On
> Behalf Of Ullas Joseph
> Sent: Wednesday, August 19, 2009 11:39 PM
> To: users@openlayers.org
> Subject: [OpenLayers-Users] Pop is not closing while Zooming
>
>
>
> Hello,
>
>
>
> I am using open layers cluster startegy in my map application and i am using
> data from kml.
>
> Everything is working fine except the popups.
>
>
>
> If one popup is open and then i zoom, and if i try to close that, i am
> getting a javascript error layer is null.
>
> If somebody came across the issue... please help.
>
>
>
> Thanks,
>
> Joseph
>
> ___
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>



-- 
Ivan Grcic
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] Pop is not closing while Zooming

2009-08-19 Thread Kris Geusebroek
Hi,

 

You probably lose the connection with the feature. Popup is registered
with the feature and if the feature is not there anymore 

Best way is to register a function that closes the popup at layer unload

 

Cheers Kris

 

From: users-boun...@openlayers.org [mailto:users-boun...@openlayers.org]
On Behalf Of Ullas Joseph
Sent: Wednesday, August 19, 2009 11:39 PM
To: users@openlayers.org
Subject: [OpenLayers-Users] Pop is not closing while Zooming

 

Hello,

 

I am using open layers cluster startegy in my map application and i am
using data from kml.

Everything is working fine except the popups.

 

If one popup is open and then i zoom, and if i try to close that, i am
getting a javascript error layer is null.

If somebody came across the issue... please help.

 

Thanks,

Joseph

___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


[OpenLayers-Users] Pop is not closing while Zooming

2009-08-19 Thread Ullas Joseph
Hello,
I am using open layers cluster startegy in my map application and i am using
data from kml.
Everything is working fine except the popups.

If one popup is open and then i zoom, and if i try to close that, i am
getting a javascript error layer is null.
If somebody came across the issue... please help.

Thanks,
Joseph
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users