使用openlayers4如何实现点的扩散?
程序员文章站
2022-03-25 19:03:08
...
这篇文章主要为大家详细介绍了基于openlayers4实现点的扩散效果,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
本文实例为大家分享了openlayers4实现点的扩散效果,供大家参考,具体内容如下
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <link rel="stylesheet" href="https://openlayers.org/en/v4.6.4/css/ol.css" rel="external nofollow" type="text/css"> <!-- The line below is only needed for old environments like Internet Explorer and Android 4.x --> <script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script> <script src="https://openlayers.org/en/v4.6.4/build/ol.js"></script> <style> .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); } } </style> </head> <body> <p id="map" style="width: 100%;height: 100%"></p> <script> 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_p = document.createElement('p'); point_p.className = 'css_animation'; point_overlay = new ol.Overlay({ element:point_p, positioning:'center-center' }); map.addOverlay(point_overlay); point_overlay.setPosition([12950000, 4860000]); </script> </body> </html>
上面是我整理给大家的,希望今后会对大家有帮助。
相关文章:
以上就是使用openlayers4如何实现点的扩散?的详细内容,更多请关注其它相关文章!
上一篇: PHP自动重命名文件实现方法,
下一篇: 怎样使用vuex项目结构目录与配置
推荐阅读
-
如何使用Spring+redis实现对session的分布式管理
-
解析如何正确使用SqlConnection的实现方法
-
解析如何正确使用SqlConnection的实现方法
-
IOS如何使用CAShapeLayer实现复杂的View的遮罩效果
-
视频如何实现批量压缩?使用迅捷压缩批量压缩视频的方法
-
小程序云开发教程如何使用云函数实现点赞功能
-
Cwrsync如何使用可以实现Linux与windows下的文件同步详解
-
jquery如何实现锚点链接之间的平滑滚动
-
如何使用PHP实现javascript的escape和unescape函数
-
IOS如何使用CAShapeLayer实现复杂的View的遮罩效果