热力图-源代码示例 运行 重置

                    <!DOCTYPE html>

<html>
<head>
    <meta charset='UTF-8'/>
    <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no'/>
    <link href='http://bigemap.com:9000/bigemap-gl.js/v1.1.0/Widgets/widgets.css' rel='stylesheet'/>
    <script src='http://bigemap.com:9000/bigemap-gl.js/v1.1.0/bigemap-gl.js'></script>
     <script src="/bmgl/data/heatmap/heatmap.min.js"></script>
    <script src="/bmgl/data/heatmap/bmg-heatmap.js"></script>
    <style>
        body {
            margin: 0;
            padding: 0;
        }
        .bmgl-widget-credits{display:none}
        #container {
            position: absolute;
            top: 0;
            bottom: 0;
            width: 100%;
        }
        
    </style>
    <title>part_test</title>
</head>
<body>

<div id='container'></div>

<script>
    bmgl.Config.HTTP_URL = 'http://bigemap.com:9000';
    var viewer = new bmgl.Viewer('container', {mapId: 'bigemap.googlemap-satellite'});
    var heatData=[{lat:39.258476,lng:110.219918,value:42},
        {lat:39.277398,lng:110.239745,value:46},
        {lat:39.319952,lng:110.092288,value:39},
        {lat:39.474548,lng:110.068417,value:36},
        {lat:39.437506,lng:110.056819,value:38},
        {lat:38.971221,lng:110.592357,value:40},
        {lat:38.95199,lng:111.097213,value:41},
        {lat:38.846696,lng:110.17917,value:42},
        {lat:39.352112,lng:110.189824,value:33},
        {lat:39.431853,lng:110.077273,value:30},
        {lat:39.351684,lng:110.161226,value:43},
        {lat:38.994047,lng:110.271835,value:44},
        {lat:38.733172,lng:110.170308,value:45},
        {lat:39.042436,lng:110.430257,value:46}]
        var heatmap=new bmglHeatMap(viewer,heatData,{
        radius: 30,
        maxOpacity: 0.9,
        minOpacity: 0.2,
        blur: .75,
        // gradient: {
        //     '.5': 'blue',
        //     '.8': 'red',
        //     '.95': ''
        // }
    });
    viewer.flyTo(heatmap.entity);
    //heatmap.remove() 删除
    //heatmap.show();
    //headmap.hide()
    //heatmap.setData(heatData)//更新
</script>
</body>
</html>                                                                                                                                                                                                                                                                                                                    
源码