[OpenLayers-Users] How to Add Multi-Vector-Layers into SelectFeature?

RaymondLv luguangxian at sohu.com
Mon Jul 16 09:46:14 EDT 2007


I'm a beginner to OpenLayers and have three vector layers below, but only one
gml layer can be hovered or selected. 
How to add them all into SelectFeature?  
many thanks

/*******************************************************************/
var gml110=new OpenLayers.Layer.GML("110kv",
"110.xml",{style:style_yellow});
map.addLayer(gml110);
        
var gml220=new OpenLayers.Layer.GML("220Kv", "220.xml",{style:style_red});            
map.addLayer(gml220);
            
var vectors = new OpenLayers.Layer.Vector( "Editable Vector Layer");
map.addLayer(vectors);
map.addControl(new OpenLayers.Control.EditingToolbar(vectors));
            
var vctoptions = {
       hover: false,
       onSelect: displayWKT
};

var drawControls = new OpenLayers.Control.SelectFeature(gml110, vctoptions);
map.addControl(drawControls);
drawControls.activate();
/*******************************************************************/
-- 
View this message in context: http://www.nabble.com/How-to--Add-Multi-Vector-Layers-into-SelectFeature--tf4079356.html#a11594470
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list