Openlayers 3 热力图
Posted 米娜-火箭
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Openlayers 3 热力图相关的知识,希望对你有一定的参考价值。
<body> <div id="map"></div> <script> var map = new ol.Map({ //初始化map target: \'map\', layers: [ new ol.layer.Tile({ source: new ol.source.OSM() }) ], view: new ol.View({ center: ol.proj.transform([37.41, 8.82], \'EPSG:4326\', \'EPSG:3857\'), zoom: 4 }) }); var blur = document.getElementById(\'blur\'); var radius = document.getElementById(\'radius\'); var heatmap = new ol.layer.Heatmap({ source: new ol.source.Vector({ url: \'data/kml/2012_Earthquakes_Mag5.kml\', projection: \'EPSG:3857\', format: new ol.format.KML({ extractStyles: false }) }), blur: 10, radius: 10 }); map.addLayer(heatmap); </script> </body>
以上是关于Openlayers 3 热力图的主要内容,如果未能解决你的问题,请参考以下文章