gpt4 book ai didi

javascript - 仅以特定缩放级别显示 OpenLayers Vector 上的要素

转载 作者:搜寻专家 更新时间:2023-11-01 04:19:32 26 4
gpt4 key购买 nike

如何根据缩放级别在矢量图层上显示特征?

例如:我只想在缩放两次时看到矢量图层上的特征。

提前致谢!

最佳答案

看看这个documentation

通过使用 minScalemaxScale .

您也可以使用 minResolution 和 maxResolution,但似乎使用比例更好。

minScale - float -- the minimum scale value at which the layer should display

maxScale - float -- the maximum scale value at which the layer should display

maxResolution - float -- the maximum resolution value at which the layer should display

minResolution - float -- the minimum resolution value at which the layer should display

关于javascript - 仅以特定缩放级别显示 OpenLayers Vector 上的要素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10106462/

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