当前位置:网站首页>Openlayers 5.0 thermal diagram

Openlayers 5.0 thermal diagram

2022-04-23 19:09:00 GIS roast lamb leg is delicious

import Vector from 'ol/source/Vector.js'
import { Heatmap as HeatmapLayer } from 'ol/layer.js'
import Feature from 'ol/Feature.js'
import Point from 'ol/geom/Point.js'
var webgissource={};
webgissource.heatmapsource=new Vector()
webgissource.heatmapvector = new HeatmapLayer({
    //  Vector data source 
   source: webgissource.heatmapsource,
    blur:  parseInt(50, 10), //  Fuzzy size 
    opacity: 1,
    radius: parseInt(30, 10) //  Hot spot radius 
   })
map.addLayer(webgissource.heatmapvector);   

static heatmaplayer(data){
//data data format {x:107.4,y108.5}  for Loop execution heatmaplayer()
   var points=new Point([data.x,data.y]);
   var iconFeature = new Feature({
      geometry:points,
      attributions:{
        feature:data,
        type:'rlt'
      }
    })
    webgissource.heatmapvector.getSource().addFeature(iconFeature)
  }

版权声明
本文为[GIS roast lamb leg is delicious]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231908120907.html