首页 > 其他分享 >【OpenLayers笔记】Feature选中交互

【OpenLayers笔记】Feature选中交互

时间:2022-09-27 11:57:05浏览次数:61  
标签:Feature feature 选中 new OpenLayers 交互

 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

相关文章