Thanks!<br>I am not sure if I wrote this correctly. If you can take a quick look at <a href="http://naturkart.no/kulturminnekart/">http://naturkart.no/kulturminnekart/</a> and turn on som layers, click a marker and then zoom. The popup stays put. I was not sure what to use instead ofr "wfslayer".<br>
<br>/asle<br><br><div class="gmail_quote">2009/6/11 Ivan Grcic <span dir="ltr"><<a href="mailto:igrcic@gmail.com">igrcic@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Asle, this migh help also, especiall if you are using some strategy<br>
like BBOX with wfs layer:<br>
<br>
wfsLayer.events.register('loadstart', this, function (evt){<br>
if(selectedFeature && selectedFeature.popup){<br>
selectControls.unselect(PARAMS.selectedFeature);<br>
//selectControls.unselectAll(); <= this might also work<br>
}<br>
}<br>
<br>
i was banging my head with this one for some time, then i figured out<br>
that features are NOT being unselected before they are removed from<br>
the layer (BBOX has changed => new features are fetched)<br>
<br>
that way the popup stays on map but that feature that the popup has<br>
been opened on doesnt exist anymore, and there was no way to close the<br>
popup.<br>
registering loadstart event and unselecting feature there before the<br>
strategy loads new features did the job!<br>
<br>
hope it helps someone,<br>
<br>
cheers<br>
<div><div></div><div class="h5"><br>
On Tue, Jun 9, 2009 at 2:15 PM, Alexandre Dube<<a href="mailto:adube@mapgears.com">adube@mapgears.com</a>> wrote:<br>
> Hi,<br>
><br>
> Just put a break point on this line :<br>
> if (*feature.popup[]*= null){<br>
><br>
> Then, using the "script" tag and at the right the "watch" tab, you will<br>
> then be able to see all variables and object currently available,<br>
> including "this" (which should be your map object).<br>
><br>
> There's plenty of tutorials on the web that could help. Just google<br>
> "firebug how to use" for example.<br>
><br>
> Best of luck,<br>
><br>
> Alexandre<br>
><br>
><br>
> Asle Benoni wrote:<br>
>> Ok. Not really sure where to put this, when does it fire?<br>
>><br>
>> function checkPopup(feature) {<br>
>> if (*feature.popup[]*= null){<br>
>> feature.popup.destroy();<br>
>> }<br>
>> }<br>
>><br>
>> map.events.register("moveend", map, checkPopup);<br>
>> I have FireBug but do not really know what to check :-(<br>
>><br>
>> Forgive my small knowledge here.<br>
>><br>
>> /asle<br>
>><br>
><br>
><br>
> --<br>
> Alexandre Dubé<br>
> Mapgears<br>
> <a href="http://www.mapgears.com" target="_blank">www.mapgears.com</a><br>
><br>
</div></div><div><div></div><div class="h5">> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
> <a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
><br>
<br>
<br>
<br>
--<br>
</div></div><font color="#888888">Ivan Grcic<br>
</font></blockquote></div><br>