Openlayers 如何在开放图层地图中的标记单击上设置蜘蛛视图标记?

Openlayers 如何在开放图层地图中的标记单击上设置蜘蛛视图标记?,openlayers,openlayers-3,openlayers-5,angular-openlayers,openlayers-6,Openlayers,Openlayers 3,Openlayers 5,Angular Openlayers,Openlayers 6,我已经创建了开放层地图,并使用一些动态纬度和经度在地图中设置了标记 有些纬度和经度值是相同的,所以 单击标记时如何打开spider视图 let path = this.props.waypts; path.map((lat,index)=>{ let fill = new style.Fill({color:'rgba(255,255,255,1)'}), stroke = new style.Stroke({colo

我已经创建了开放层地图,并使用一些动态纬度和经度在地图中设置了标记 有些纬度和经度值是相同的,所以 单击标记时如何打开spider视图

   let path = this.props.waypts;

        path.map((lat,index)=>{
            let fill = new style.Fill({color:'rgba(255,255,255,1)'}),
            stroke = new style.Stroke({color:'rgba(0,0,0,1)'}),
            style1 = [
                new style.Style({
                    image: new style.Icon(({
                        scale: .9, 
                        opacity: 1,
                        rotateWithView: false, 
                        anchor: [0.5, 1],
                        anchorXUnits: 'fraction', 
                        anchorYUnits: 'fraction',
                        src: "https://img.icons8.com/metro/40/"+(this.props.color[index]).replace( /#/g, "" )+"/marker.png"
                    })),
                    zIndex: 5
                }),
                new style.Style({
                    image: new style.Circle({
                        radius: 6, 
                        fill: fill, 
                        stroke: stroke
                    }),
                    zIndex: 4
                })
            ];

            let abc = 'feature'+[index+1];               
            abc = new Feature({
                geometry: new geom.Point(path[index])
            });
            abc.setStyle(style1);
            sourceFeatures.addFeatures([abc]);
        })

        map.getView().fit(sourceFeatures.getExtent(), map.getSize()); 

在ol-ext中查看ol/interaction/SelectCluster。在select上,群集弹开以显示其中的功能。 参见在线示例:


如果您正在寻找类似的内容,则需要使用群集源。这就是你对spider view的意思吗?spider view是指当我单击标记时,在同一位置使用连接线排列所有标记。