PadovaBoy Aka Giovanni Bismondo <padovaboy@...> writes:

> 
> Hi at all,
> i have a map with:
> - single image layer as background layer
> - many layer with many geometry features
> - one SelectFeature to select on click a feature
> - one SelectFeature to highlight on mouseover
> 
> Now the problem is that in IE all works well(incredible!). In FF not
> (semi-incredible!).
> For FF ONLY the first layer added to the map work, all other layers not.
> 
> My procedure (in human-meta-language):
> - create map
> - create the 2 SelectFeature with an array empty of layers []
> - add layers to the map
>    - for each layer i:
>     - attach an event listener to the layer for the highlight events
>     - push it in the '.layers' property of the two SelectFeature
>     - activate the control
> 
> I have tried another way: (more logical, but nothing work)
> - create map
> - add the layers
> - pass the array layer to the SelectFeature controls AND set the listener
> 
> Tnx for any suggestion!
> 


Ok solved!
I found the problem tnx to this post:
http://news.gmane.org/find-root.php?message_id=%3cCOL105%2dW619C1CFB96C6B6EF908D6480100%40phx.gbl%3e


I don't know why but if i use the second way (create the SelectFeature control
with the final list of layer) i MUST call the .activate() method at the end.
Initially i supposed that the control was ready just on creation.

Another issue that i found is that the 2 SelectFeature share the same istance of
the property layers... it's very strange!

And finally another question:
if i activate the 2 controls with this order:
  this.SelectControl.activate();
  this.SelectHoverControl.activate();

the 'select on click' feature dont' work!

But if i use this order:
this.SelectHoverControl.activate();
this.SelectControl.activate();

All works.

Wired things happen.

Tnx for all.







_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to