maptalks 绘制热力图

  1. 安装maptalks.heatmap插件

    	yarn add maptalks.heatmap --save
    
  2. 在页面import相关组件

        import MaptalksCom from '@components/mapComponents/MaptalksCom'
        import { HeatLayer } from 'maptalks.heatmap'
    
  3. 准备数据,构建heatLayer,添加到map对象中

    	const addressPoints = [
        [-37.8839, 175.3745188667, "571"],
        [-37.8869090667, 175.3657417333, "486"],
        [-37.8894207167, 175.4015351167, "807"],
        [-37.8927369333, 175.4087452333, "899"]]
        const heatlayer = new maptalks.HeatLayer('heat', data, {
            'heatValueScale': 0.7,
            'forceRenderOnRotating' : true,
            'forceRenderOnMoving' : true
        }).addTo(map);
    
    
上一篇:javascript – 转换ArcGis地理坐标Lat Long wkid:4326到投影坐标wkid:102000/3857


下一篇:python – 在matplotlib中组合多个热图