本文实例为大家分享了openlayers4实现点的扩散效果,供大家参考,具体内容如下
Title.css_animation{
height:100px;
width:100px;
border-radius: 50%;
background: rgba(255, 0, 0, 0.9);
transform: scale(0);
animation: myfirst 3s;
animation-iteration-count: infinite;
}
@keyframes myfirst{
to{
transform: scale(2);
background: rgba(0, 0, 0, 0);
}
}
var map = new ol.Map({
layers:[new ol.layer.Tile({
source:new ol.source.OSM()
})],
target:'map',
view:new ol.View({
center: [12950000, 4860000],
zoom:7
})
});
var point_div = document.createElement('div');
point_div.className = 'css_animation';
point_overlay = new ol.Overlay({
element:point_div,
positioning:'center-center'
});
map.addOverlay(point_overlay);
point_overlay.setPosition([12950000, 4860000]);
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持脚本之家。