简体   繁体   English

高缩放功能时,图标消失

[英]At a high zoom feature icons disappear

When zoomed into a feature icon, the larger scale it is the more chance it has of not being displayed when partially off screen. 放大到功能图标时,比例越大,部分离开屏幕时不显示的可能性就越大。

The geom point is center of the icon, so at a high zoom the geom point being off screen put it outside of the extent (fine), but I need the icon to still display partially within the extent. 几何点位于图标的中心,因此在高缩放时,几何点在屏幕外时将其放在范围之外(精细),但是我需要图标仍部分显示在范围内。 The effect is that it stays partially onscreen until it hits just past half way off screen at which point it stops displaying. 效果是它一直保持在部分屏幕上,直到它刚好离开屏幕一半时才停止显示。

I've looked at ol.extent.buffer but I don't think it's for me. 我已经看过ol.extent.buffer了,但是我不认为这适合我。 Is there a 'buffer ' I can set that means that the view is rendering an extent larger than it so icons will still display partially? 我是否可以设置“缓冲区”,这意味着视图渲染的范围大于其范围,因此图标仍会部分显示?

ol.layer.Vector takes a renderBuffer argument, which lets you specify a buffer around the viewport which will be included in the rendering. ol.layer.Vector带有renderBuffer参数,该参数可让您在视口周围指定一个缓冲区,该缓冲区将包含在渲染中。 The default is 100px. 默认值为100px。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM