只在特定缩放级别下显示OpenLayers矢量图层的功能

5

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

例如:只有当我缩放两次时,我才想在矢量图层上看到要素。

谢谢!

1个回答

4
请查看此文档 通过使用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

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接