115Echarts - 热力图(Heatmap on Baidu Map Extension)

简介: 115Echarts - 热力图(Heatmap on Baidu Map Extension)
效果图

源代码
app.title = '热力图与百度地图扩展';
$.get('data/asset/data/hangzhou-tracks.json', function (data) {
    var points = [].concat.apply([], data.map(function (track) {
        return track.map(function (seg) {
            return seg.coord.concat([1]);
        });
    }));
    myChart.setOption(option = {
        animation: false,
        bmap: {
            center: [120.13066322374, 30.240018034923],
            zoom: 14,
            roam: true
        },
        visualMap: {
            show: false,
            top: 'top',
            min: 0,
            max: 5,
            seriesIndex: 0,
            calculable: true,
            inRange: {
                color: ['blue', 'blue', 'green', 'yellow', 'red']
            }
        },
        series: [{
            type: 'heatmap',
            coordinateSystem: 'bmap',
            data: points,
            pointSize: 5,
            blurSize: 6
        }]
    });
    if (!app.inNode) {
        // 添加百度地图插件
        var bmap = myChart.getModel().getComponent('bmap').getBMap();
        bmap.addControl(new BMap.MapTypeControl());
    }
});
目录
相关文章
|
4月前
Echarts 热力图自定义开发
Echarts 热力图自定义开发
151 0
|
11月前
|
关系型数据库
197Echarts - 自定义系列(Polar Heatmap)
197Echarts - 自定义系列(Polar Heatmap)
48 0
|
11月前
133Echarts - 路径图(Bus Lines of Beijing - Baidu Map)
133Echarts - 路径图(Bus Lines of Beijing - Baidu Map)
46 0
|
2月前
echarts 热力图(中国地图版)
echarts 热力图(中国地图版)
99 0
|
2月前
echarts 报错 —— Component series.map not exists. Load it first
echarts 报错 —— Component series.map not exists. Load it first
78 0
|
4月前
|
JavaScript 定位技术
Vue中使用百度地图demo Vue Baidu Map(vue-baidu-map)设置窗口信息
Vue中使用百度地图demo Vue Baidu Map(vue-baidu-map)设置窗口信息
264 0
|
4月前
|
JavaScript
封装echarts china map geo实现dispatch触发geoSelect事件高亮显示某个省份和城市,并定义复杂样式
封装echarts china map geo实现dispatch触发geoSelect事件高亮显示某个省份和城市,并定义复杂样式
|
11月前
188Echarts - 日历坐标系(Calendar Heatmap Vertical)
188Echarts - 日历坐标系(Calendar Heatmap Vertical)
34 0
|
11月前
184Echarts - 日历坐标系(Calendar Heatmap Horizontal)
184Echarts - 日历坐标系(Calendar Heatmap Horizontal)
25 0
|
11月前
183Echarts - 日历坐标系(Calendar Heatmap)
183Echarts - 日历坐标系(Calendar Heatmap)
34 0

热门文章

最新文章