![](/img/trans.png)
[英]How can I serialize all features on a layer to json using openlayers 3
[英]How can I get all the features displayed on a map in OpenLayers?
有沒有辦法我可以從OpenLayers Vector圖層中獲取在地圖上可見的所有功能?
例如,如果該圖層具有100個要素,但是處於我的縮放級別,此刻我只能看到其中的20個要素。
有沒有辦法以編程方式獲取地圖上的可見特征?
謝謝
OL2解決方案,我在2013年的回答:
看一下OpenLayers的onScreen
方法:
http://dev.openlayers.org/docs/files/OpenLayers/Marker-js.html#OpenLayers.Marker.onScreen
OL3解決方案:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.