【发布时间】:2016-08-18 10:15:52
【问题描述】:
我在此处设置了当前设置:fully functional fiddle example,并且我需要对点特征进行动画处理...使其像 Google 等上的 GPS 位置一样脉冲。我找到了这篇文章:http://openlayers.org/en/master/examples/feature-animation.html,但发现它真的很混乱并且不知道如何将它应用到我的代码中。
这是小提琴中创建点特征并将其应用于地图的部分......
function locate_me() {
var locationPoint = new ol.Feature({
geometry: new ol.geom.Point([0.3901863098144531, 52.803332200169166])
});
locationPoint.getGeometry().transform('EPSG:4326', 'EPSG:3857');
// A vector layer to hold the location point
var locationLayer = new ol.layer.Vector({
source: new ol.source.Vector({
features: [
locationPoint
]
})
});
map.addLayer(locationLayer);
}
【问题讨论】:
-
更好地展示你想要实现的动画。
-
@JonatasWalker OL 示例中的那个很好,但是用蓝色圆圈代替红色...我只是不知道从哪里开始!