openlayers 3 功能动画是否仅由 postcompose 触发?
Is openlayers 3 feature animation only triggered by postcompose?
我正在 OpenLayers 3 中制作点动画。这些点来自大型数据集。目前,一旦加载 geoJSON 数据,我的动画就会作为回调触发。我想使用使用 frameState 和 vectorContext 的 OpenLayers 功能动画,并且已经 运行 实验只是得出结论,要使用这个方案,我需要使用 postcompose 事件触发它。有没有办法在我的大型 geoJSON 文件加载后将其作为回调触发?
谢谢。
更新:看看这个例子 - http://openlayers.org/en/v3.11.0/examples/feature-move-animation.html.
触发postcompose
事件的方法是map.render()
; Now if you want to wait until you geojson
is fully loaded check for its state
:
vectorSource.on('change', function(evt){
if (vectorSource.getState() === 'ready') {
//fully loaded
}
});
我正在 OpenLayers 3 中制作点动画。这些点来自大型数据集。目前,一旦加载 geoJSON 数据,我的动画就会作为回调触发。我想使用使用 frameState 和 vectorContext 的 OpenLayers 功能动画,并且已经 运行 实验只是得出结论,要使用这个方案,我需要使用 postcompose 事件触发它。有没有办法在我的大型 geoJSON 文件加载后将其作为回调触发?
谢谢。
更新:看看这个例子 - http://openlayers.org/en/v3.11.0/examples/feature-move-animation.html.
触发postcompose
事件的方法是map.render()
; Now if you want to wait until you geojson
is fully loaded check for its state
:
vectorSource.on('change', function(evt){
if (vectorSource.getState() === 'ready') {
//fully loaded
}
});