gpt4 book ai didi

mapbox-gl-js - 不同缩放级别的 map.querySourceFeatures

转载 作者:行者123 更新时间:2023-12-04 15:56:04 24 4
gpt4 key购买 nike

map.querySourceFeatures 返回不同数量的对象
在不同的缩放级别。
有没有办法获取所有数据,而不仅仅是可见的?
谢谢

var feature = map.querySourceFeatures("mapbox-postcodes", {
sourceLayer: ['Distribution'],
filter: ['==', ['to-string', ['get', 'name']], "someCode"]
});

最佳答案

querySourceFeatures() 始终返回已加载到当前视口(viewport)中的要素。除了当前缩放级别之外,它无法访问任何内容。

The domain of the query includes all currently-loaded vector tiles and GeoJSON source tiles: this function does not check tiles outside the currently visible viewport.

关于mapbox-gl-js - 不同缩放级别的 map.querySourceFeatures,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51574403/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com