我是openlayers的新手,我想对矢量数据使用cluster
函数。
如果我在群集选项中指定一个MVT VectorTileSource作为source:
,这似乎不起作用?!
下面的代码。它在没有集群的情况下工作良好。
它不受支持吗?谢谢你,彼得
var vectorTileSource = new VectorTileSource({
format: new MVT(),
url:
'http://xxxx/geoserver/gwc/service/tms/1.0.0/' + 'airports:airports' +
'@EPSG%3A'+'900913'+
'@pbf/{z}/{x}/{-y}.pbf'
});
var clusterSource = new Cluster({
distance: 30,
source: vectorTileSource
});
var clusterLayer = new VectorTileLayer({
source: vectorTileSource, //----> this works
source: clusterSource, // ---> does NOT work
style: clusterStyle
});
https://stackoverflow.com/questions/55161380
复制相似问题