[OpenLayers-Users] select multiple layers?
Eric Lemoine
eric.c2c at gmail.com
Thu May 29 02:37:44 EDT 2008
On Thu, May 29, 2008 at 12:51 AM, Wendell Turner <wendell at enflight.com> wrote:
> In an environment where multiple layers have objects that
> are selectable,
You mean you have multiple vector layers and one select feature
control for each? If that's the case I'd be surprised you got it
working. Due to current browser limitations feature selection with
multiple vector layers does not work in OpenLayers.
> how do they get un-selected? That is,
> in this function:
> function onPopupClose(evt) {
> selectControl.unselect(selectedFeature);
> }
> how does it know which selectControl item was used for the
> popup?
It doesn't.
> Does the evt object have a reference to the
> selectControl?
It doesn't.
> Or does the
> function onFeatureSelect(feature)
> need to save that value?
Yes, your app-level code need do the job.
> Does the feature object have a
> reference to a layer or selectControl?
feature.layer references the layer the feature in added to.
> Or can one selectControl span multiple layers?
It can't.
Cheers,
--
Eric
More information about the Users
mailing list