SelectFeaturesHandler treating only one layer

32 views
Skip to first unread message

diego

unread,
May 29, 2012, 8:43:35 AM5/29/12
to openscales-dev
Hi all.

According to the documentation, and to the source code, which I have
inspected, SelectFeaturesHandler should treat all layers in the map,
unless otherwise specified in the "layers" property. I've been testing
it and apparently it's only getting the information from the topmost
layer.

The function onClickFeature has some code commented out, and says
something about a bug. This is the code:

private function onClickFeature(evt:FeatureEvent):void {
if(evt && this.map && evt.feature && evt.feature.layer) {
for(var i:* in this.layers) {
if(layers[i].name == evt.feature.layer.name){
//fix bug : must be changed
//this.map.dispatchEvent(new
FeatureEvent(FeatureEvent.FEATURE_SELECTED, evt.feature));
return;
}
}

}
}

Is there a way to make SelectFeaturesHandler treat all layers? Could
someone give me indications as to how to fix this bug? I could try to
fix it and report it back to the community.

TIA

Diego Marrero

Diego Marrero

unread,
May 29, 2012, 11:14:35 AM5/29/12
to openscales-dev
Extending my last question, let's imagine I have loaded one WMS layer and two WFS layers, and that I have activated a WMSGetFeatureInfo handler and a SelectFeaturesHandler on the map. I the user clicks, would OpenScales detect and treat all layers accordingly?.

TIA

Diego Marrero


2012/5/29 diego <diego.marre...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "openscales-dev" group.
To post to this group, send email to opensca...@googlegroups.com.
To unsubscribe from this group, send email to openscales-de...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/openscales-dev?hl=en.


Reply all
Reply to author
Forward
0 new messages