Hi,
        I have two vector layers Layer1 and Layer2 on a country base map.
        I use the following code to fetch data for the layers.
        var selectControl = new OpenLayers.Control.SelectFeature(
                                [Layer1, Layer2],
                {
                    toggle: true,
                    multiple: true, 
                                        hover: true,
                                        onSelect: getLayerDetails
                                }
                                
                        );
                        
                
                function getLayerDetails(feature) {
                        alert(feature.attributes.name);
                }
                
        The above function gives me data correctly when i hover on each 
independant
layers, but
        there are certain areas on the map where some parts of Layer1 and Layer2
overlap.
        When I hover on the overlap, I always get the data for Layer1.
        I read here in http://docs.openlayers.org/library/overlays.html, under
Interaction section that ,
        there is no support for selecting features from more than a single 
vector
layer at a time, as of OL 2.7.
        
        Is there a way in OL 2.8 by which I can get data for the underlying 
Layer2
as well.
        Or is there a workaround (for the overlap area) by which can I get the 
data
for the a particular layer based on which layer was hovered previously.

Any help would be highly appreciated. 
        
        
        
Thanks and regards
Afroz Kannancheri Kodiyathur
        
        
-- 
View this message in context: 
http://n2.nabble.com/SelectFeature-on-Overlapping-Layers-tp4412919p4412919.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to