map.addInteraction( new Select({ style: function (feature) { feature.setStyle( new Style({ //选中Feature之后线变成绿色 stroke: new Stroke({ color: "#00FF00" }), }) ); }, }) );
效果:
标签:Feature,feature,选中,new,OpenLayers,交互 From: https://www.cnblogs.com/mesmerize/p/16734056.html