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