首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >openlayers:使用MVT VectorTileSource集群是不可能的?

openlayers:使用MVT VectorTileSource集群是不可能的?
EN

Stack Overflow用户
提问于 2019-03-14 19:28:50
回答 2查看 804关注 0票数 2

我是openlayers的新手,我想对矢量数据使用cluster函数。

如果我在群集选项中指定一个MVT VectorTileSource作为source:,这似乎不起作用?!

下面的代码。它在没有集群的情况下工作良好。

它不受支持吗?谢谢你,彼得

代码语言:javascript
复制
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 
  });
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55161380

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档