chellymehdi / vopenlayers

Automatically exported from code.google.com/p/vopenlayers
0 stars 0 forks source link

multiple OpenLayers.Control.SelectFeature instances #96

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The problem:
In case you have more than one layer derived from 
VAbstractAutopopulatedVectorLayer every layer got it own SelectFeature 
instance. If all these layers have select listener only the last one can 
capture the mouse events.

What steps will reproduce the problem?
Problem is reproduced with Firefox and Google Chrome. Open 
WebFeatureServiceLayerTest2 and click the features on different layers. You 
will see some feature give only response if only their layer is visible. 

Next steps:
I will try to find a way to let use all layers the same SelectFeature instance. 
But this moment I have no idea how :-D

Original issue reported on code.google.com by eiko.tho...@gmail.com on 21 Oct 2012 at 7:26

GoogleCodeExporter commented 8 years ago
Okay, maybe I got a idea ... I will extent the AbstractAutoPopulatedVectorLayer 
class with a selection id. Layers want to share the SelectFeature instance 
choose while creation the same selection id. In 
VAbstractAutopopulatedVectorLayer the SelectFeature instance is created by a 
factory that handles the selection id. If there is a existing control for a 
specific selection id the factory returns the existing one. In other case it 
creates a new instance.

Original comment by eiko.tho...@gmail.com on 21 Oct 2012 at 8:45

GoogleCodeExporter commented 8 years ago
Basicly it works but do some deep changes in VAbstractAutopopulatedVectorLayer 
but original use will already work. I will do some more tests but what can I do 
to minimize the chance of errors in other programm parts. Is there a automated 
test suite?

Last time I think about a selenium test project for the included demo. It could 
also hosted at Google code.

Original comment by eiko.tho...@gmail.com on 25 Oct 2012 at 9:41

GoogleCodeExporter commented 8 years ago
Hi Matti,
add a factory to share SelectFeature controls between vector layers. This new 
feature is optional. The old usage with one control per layer still work like 
in previous versions (for instance WebFeatureServiceLayerTest in the demo).

So long,
Eiko

PS: For the next time I will still play with vaadin 6.*. Before I switch I need 
to become more familiar with vaadin.

Original comment by eiko.tho...@gmail.com on 30 Oct 2012 at 10:53