echarts地图控件官方实例如何调用 显示地图 5C

//问题描述:
调用了官网提供的地址但是就是不显示地图

//官网地址:
https://www.echartsjs.com/examples/zh/editor.html?c=effectScatter-bmap

//截图
图片说明

//代码展示

<script src="pcManager/dist/echarts.js"></script>
<!-- 引入 vintage 主题 -->
<script src="pcManager/theme/vintage.js"></script>
<script>
// 第二个参数可以指定前面引入的主题
var chart = echarts.init(document.getElementById('main'), 'vintage');
chart.setOption({
//把官网提供的option套进去
    ...
});
</script>

//目前显示的界面没有地图
图片说明

//由于数据太多 把我的主要代码结构粘出来

<head>
    <%--引入echarts控件--%>
    <script src="/erzhentang/FR-LIB/incubator-echarts-4.4.0/dist/echarts.js"></script>
    <!-- 引入 vintage 主题 -->
    <script src="/erzhentang/FR-LIB/incubator-echarts-4.4.0/theme/vintage.js"></script>
<div id="dv_area" style="width: 800px;height:600px;"></div>
<script type="text/javascript">
</head>
<body>
        var myChart1 = echarts.init(document.getElementById('dv_area'),'vintage');

        var data = [
            {name: '海门', value: 9},
            {name: '鄂尔多斯', value: 12},
            {name: '招远', value: 12},
            {name: '舟山', value: 12},
            {name: '齐齐哈尔', value: 14},
            {name: '盐城', value: 15},
            {name: '赤峰', value: 16},
            {name: '青岛', value: 18},
            {name: '乳山', value: 18},
            {name: '金昌', value: 19},
            {name: '泉州', value: 21},
            {name: '莱西', value: 21},
            {name: '日照', value: 21},
            {name: '胶南', value: 22},
            {name: '南通', value: 23},
            {name: '拉萨', value: 24},
            {name: '云浮', value: 24},
            {name: '梅州', value: 25},
            {name: '文登', value: 25},
            {name: '上海', value: 25},
            {name: '攀枝花', value: 25},
            {name: '威海', value: 25},
            {name: '承德', value: 25},
            {name: '厦门', value: 26},
            {name: '汕尾', value: 26},
            {name: '潮州', value: 26},
            {name: '丹东', value: 27},
            {name: '太仓', value: 27},
            {name: '曲靖', value: 27},
            {name: '烟台', value: 28},
            {name: '福州', value: 29},
            {name: '瓦房店', value: 30},
            {name: '即墨', value: 30},
            {name: '抚顺', value: 31},
            {name: '玉溪', value: 31},
            {name: '张家口', value: 31},
            {name: '阳泉', value: 31},
            {name: '莱州', value: 32},
            {name: '湖州', value: 32},
            {name: '汕头', value: 32},
            {name: '昆山', value: 33},
            {name: '宁波', value: 33},
            {name: '湛江', value: 33},
            {name: '揭阳', value: 34},
            {name: '荣成', value: 34},
            {name: '连云港', value: 35},
            {name: '葫芦岛', value: 35},
            {name: '常熟', value: 36},
            {name: '东莞', value: 36},
            {name: '河源', value: 36},
            {name: '淮安', value: 36},
            {name: '泰州', value: 36},
            {name: '南宁', value: 37},
            {name: '营口', value: 37},
            {name: '惠州', value: 37},
            {name: '江阴', value: 37},
            {name: '蓬莱', value: 37},
            {name: '韶关', value: 38},
            {name: '嘉峪关', value: 38},
            {name: '广州', value: 38},
            {name: '延安', value: 38},
            {name: '太原', value: 39},
            {name: '清远', value: 39},
            {name: '中山', value: 39},
            {name: '昆明', value: 39},
            {name: '寿光', value: 40},
            {name: '盘锦', value: 40},
            {name: '长治', value: 41},
            {name: '深圳', value: 41},
            {name: '珠海', value: 42},
            {name: '宿迁', value: 43},
            {name: '咸阳', value: 43},
            {name: '铜川', value: 44},
            {name: '平度', value: 44},
            {name: '佛山', value: 44},
            {name: '海口', value: 44},
            {name: '江门', value: 45},
            {name: '章丘', value: 45},
            {name: '肇庆', value: 46},
            {name: '大连', value: 47},
            {name: '临汾', value: 47},
            {name: '吴江', value: 47},
            {name: '石嘴山', value: 49},
            {name: '沈阳', value: 50},
            {name: '苏州', value: 50},
            {name: '茂名', value: 50},
            {name: '嘉兴', value: 51},
            {name: '长春', value: 51},
            {name: '胶州', value: 52},
            {name: '银川', value: 52},
            {name: '张家港', value: 52},
            {name: '三门峡', value: 53},
            {name: '锦州', value: 54},
            {name: '南昌', value: 54},
            {name: '柳州', value: 54},
            {name: '三亚', value: 54},
            {name: '自贡', value: 56},
            {name: '吉林', value: 56},
            {name: '阳江', value: 57},
            {name: '泸州', value: 57},
            {name: '西宁', value: 57},
            {name: '宜宾', value: 58},
            {name: '呼和浩特', value: 58},
            {name: '成都', value: 58},
            {name: '大同', value: 58},
            {name: '镇江', value: 59},
            {name: '桂林', value: 59},
            {name: '张家界', value: 59},
            {name: '宜兴', value: 59},
            {name: '北海', value: 60},
            {name: '西安', value: 61},
            {name: '金坛', value: 62},
            {name: '东营', value: 62},
            {name: '牡丹江', value: 63},
            {name: '遵义', value: 63},
            {name: '绍兴', value: 63},
            {name: '扬州', value: 64},
            {name: '常州', value: 64},
            {name: '潍坊', value: 65},
            {name: '重庆', value: 66},
            {name: '台州', value: 67},
            {name: '南京', value: 67},
            {name: '滨州', value: 70},
            {name: '贵阳', value: 71},
            {name: '无锡', value: 71},
            {name: '本溪', value: 71},
            {name: '克拉玛依', value: 72},
            {name: '渭南', value: 72},
            {name: '马鞍山', value: 72},
            {name: '宝鸡', value: 72},
            {name: '焦作', value: 75},
            {name: '句容', value: 75},
            {name: '北京', value: 79},
            {name: '徐州', value: 79},
            {name: '衡水', value: 80},
            {name: '包头', value: 80},
            {name: '绵阳', value: 80},
            {name: '乌鲁木齐', value: 84},
            {name: '枣庄', value: 84},
            {name: '杭州', value: 84},
            {name: '淄博', value: 85},
            {name: '鞍山', value: 86},
            {name: '溧阳', value: 86},
            {name: '库尔勒', value: 86},
            {name: '安阳', value: 90},
            {name: '开封', value: 90},
            {name: '济南', value: 92},
            {name: '德阳', value: 93},
            {name: '温州', value: 95},
            {name: '九江', value: 96},
            {name: '邯郸', value: 98},
            {name: '临安', value: 99},
            {name: '兰州', value: 99},
            {name: '沧州', value: 100},
            {name: '临沂', value: 103},
            {name: '南充', value: 104},
            {name: '天津', value: 105},
            {name: '富阳', value: 106},
            {name: '泰安', value: 112},
            {name: '诸暨', value: 112},
            {name: '郑州', value: 113},
            {name: '哈尔滨', value: 114},
            {name: '聊城', value: 116},
            {name: '芜湖', value: 117},
            {name: '唐山', value: 119},
            {name: '平顶山', value: 119},
            {name: '邢台', value: 119},
            {name: '德州', value: 120},
            {name: '济宁', value: 120},
            {name: '荆州', value: 127},
            {name: '宜昌', value: 130},
            {name: '义乌', value: 132},
            {name: '丽水', value: 133},
            {name: '洛阳', value: 134},
            {name: '秦皇岛', value: 136},
            {name: '株洲', value: 143},
            {name: '石家庄', value: 147},
            {name: '莱芜', value: 148},
            {name: '常德', value: 152},
            {name: '保定', value: 153},
            {name: '湘潭', value: 154},
            {name: '金华', value: 157},
            {name: '岳阳', value: 169},
            {name: '长沙', value: 175},
            {name: '衢州', value: 177},
            {name: '廊坊', value: 193},
            {name: '菏泽', value: 194},
            {name: '合肥', value: 229},
            {name: '武汉', value: 273},
            {name: '大庆', value: 279}
        ];
        var geoCoordMap = {
            '海门': [121.15, 31.89],
            '鄂尔多斯': [109.781327, 39.608266],
            '招远': [120.38, 37.35],
            '舟山': [122.207216, 29.985295],
            '齐齐哈尔': [123.97, 47.33],
            '盐城': [120.13, 33.38],
            '赤峰': [118.87, 42.28],
            '青岛': [120.33, 36.07],
            '乳山': [121.52, 36.89],
            '金昌': [102.188043, 38.520089],
            '泉州': [118.58, 24.93],
            '莱西': [120.53, 36.86],
            '日照': [119.46, 35.42],
            '胶南': [119.97, 35.88],
            '南通': [121.05, 32.08],
            '拉萨': [91.11, 29.97],
            '云浮': [112.02, 22.93],
            '梅州': [116.1, 24.55],
            '文登': [122.05, 37.2],
            '上海': [121.48, 31.22],
            '攀枝花': [101.718637, 26.582347],
            '威海': [122.1, 37.5],
            '承德': [117.93, 40.97],
            '厦门': [118.1, 24.46],
            '汕尾': [115.375279, 22.786211],
            '潮州': [116.63, 23.68],
            '丹东': [124.37, 40.13],
            '太仓': [121.1, 31.45],
            '曲靖': [103.79, 25.51],
            '烟台': [121.39, 37.52],
            '福州': [119.3, 26.08],
            '瓦房店': [121.979603, 39.627114],
            '即墨': [120.45, 36.38],
            '抚顺': [123.97, 41.97],
            '玉溪': [102.52, 24.35],
            '张家口': [114.87, 40.82],
            '阳泉': [113.57, 37.85],
            '莱州': [119.942327, 37.177017],
            '湖州': [120.1, 30.86],
            '汕头': [116.69, 23.39],
            '昆山': [120.95, 31.39],
            '宁波': [121.56, 29.86],
            '湛江': [110.359377, 21.270708],
            '揭阳': [116.35, 23.55],
            '荣成': [122.41, 37.16],
            '连云港': [119.16, 34.59],
            '葫芦岛': [120.836932, 40.711052],
            '常熟': [120.74, 31.64],
            '东莞': [113.75, 23.04],
            '河源': [114.68, 23.73],
            '淮安': [119.15, 33.5],
            '泰州': [119.9, 32.49],
            '南宁': [108.33, 22.84],
            '营口': [122.18, 40.65],
            '惠州': [114.4, 23.09],
            '江阴': [120.26, 31.91],
            '蓬莱': [120.75, 37.8],
            '韶关': [113.62, 24.84],
            '嘉峪关': [98.289152, 39.77313],
            '广州': [113.23, 23.16],
            '延安': [109.47, 36.6],
            '太原': [112.53, 37.87],
            '清远': [113.01, 23.7],
            '中山': [113.38, 22.52],
            '昆明': [102.73, 25.04],
            '寿光': [118.73, 36.86],
            '盘锦': [122.070714, 41.119997],
            '长治': [113.08, 36.18],
            '深圳': [114.07, 22.62],
            '珠海': [113.52, 22.3],
            '宿迁': [118.3, 33.96],
            '咸阳': [108.72, 34.36],
            '铜川': [109.11, 35.09],
            '平度': [119.97, 36.77],
            '佛山': [113.11, 23.05],
            '海口': [110.35, 20.02],
            '江门': [113.06, 22.61],
            '章丘': [117.53, 36.72],
            '肇庆': [112.44, 23.05],
            '大连': [121.62, 38.92],
            '临汾': [111.5, 36.08],
            '吴江': [120.63, 31.16],
            '石嘴山': [106.39, 39.04],
            '沈阳': [123.38, 41.8],
            '苏州': [120.62, 31.32],
            '茂名': [110.88, 21.68],
            '嘉兴': [120.76, 30.77],
            '长春': [125.35, 43.88],
            '胶州': [120.03336, 36.264622],
            '银川': [106.27, 38.47],
            '张家港': [120.555821, 31.875428],
            '三门峡': [111.19, 34.76],
            '锦州': [121.15, 41.13],
            '南昌': [115.89, 28.68],
            '柳州': [109.4, 24.33],
            '三亚': [109.511909, 18.252847],
            '自贡': [104.778442, 29.33903],
            '吉林': [126.57, 43.87],
            '阳江': [111.95, 21.85],
            '泸州': [105.39, 28.91],
            '西宁': [101.74, 36.56],
            '宜宾': [104.56, 29.77],
            '呼和浩特': [111.65, 40.82],
            '成都': [104.06, 30.67],
            '大同': [113.3, 40.12],
            '镇江': [119.44, 32.2],
            '桂林': [110.28, 25.29],
            '张家界': [110.479191, 29.117096],
            '宜兴': [119.82, 31.36],
            '北海': [109.12, 21.49],
            '西安': [108.95, 34.27],
            '金坛': [119.56, 31.74],
            '东营': [118.49, 37.46],
            '牡丹江': [129.58, 44.6],
            '遵义': [106.9, 27.7],
            '绍兴': [120.58, 30.01],
            '扬州': [119.42, 32.39],
            '常州': [119.95, 31.79],
            '潍坊': [119.1, 36.62],
            '重庆': [106.54, 29.59],
            '台州': [121.420757, 28.656386],
            '南京': [118.78, 32.04],
            '滨州': [118.03, 37.36],
            '贵阳': [106.71, 26.57],
            '无锡': [120.29, 31.59],
            '本溪': [123.73, 41.3],
            '克拉玛依': [84.77, 45.59],
            '渭南': [109.5, 34.52],
            '马鞍山': [118.48, 31.56],
            '宝鸡': [107.15, 34.38],
            '焦作': [113.21, 35.24],
            '句容': [119.16, 31.95],
            '北京': [116.46, 39.92],
            '徐州': [117.2, 34.26],
            '衡水': [115.72, 37.72],
            '包头': [110, 40.58],
            '绵阳': [104.73, 31.48],
            '乌鲁木齐': [87.68, 43.77],
            '枣庄': [117.57, 34.86],
            '杭州': [120.19, 30.26],
            '淄博': [118.05, 36.78],
            '鞍山': [122.85, 41.12],
            '溧阳': [119.48, 31.43],
            '库尔勒': [86.06, 41.68],
            '安阳': [114.35, 36.1],
            '开封': [114.35, 34.79],
            '济南': [117, 36.65],
            '德阳': [104.37, 31.13],
            '温州': [120.65, 28.01],
            '九江': [115.97, 29.71],
            '邯郸': [114.47, 36.6],
            '临安': [119.72, 30.23],
            '兰州': [103.73, 36.03],
            '沧州': [116.83, 38.33],
            '临沂': [118.35, 35.05],
            '南充': [106.110698, 30.837793],
            '天津': [117.2, 39.13],
            '富阳': [119.95, 30.07],
            '泰安': [117.13, 36.18],
            '诸暨': [120.23, 29.71],
            '郑州': [113.65, 34.76],
            '哈尔滨': [126.63, 45.75],
            '聊城': [115.97, 36.45],
            '芜湖': [118.38, 31.33],
            '唐山': [118.02, 39.63],
            '平顶山': [113.29, 33.75],
            '邢台': [114.48, 37.05],
            '德州': [116.29, 37.45],
            '济宁': [116.59, 35.38],
            '荆州': [112.239741, 30.335165],
            '宜昌': [111.3, 30.7],
            '义乌': [120.06, 29.32],
            '丽水': [119.92, 28.45],
            '洛阳': [112.44, 34.7],
            '秦皇岛': [119.57, 39.95],
            '株洲': [113.16, 27.83],
            '石家庄': [114.48, 38.03],
            '莱芜': [117.67, 36.19],
            '常德': [111.69, 29.05],
            '保定': [115.48, 38.85],
            '湘潭': [112.91, 27.87],
            '金华': [119.64, 29.12],
            '岳阳': [113.09, 29.37],
            '长沙': [113, 28.21],
            '衢州': [118.88, 28.97],
            '廊坊': [116.7, 39.53],
            '菏泽': [115.480656, 35.23375],
            '合肥': [117.27, 31.86],
            '武汉': [114.31, 30.52],
            '大庆': [125.03, 46.58]
        };
        var convertData = function (data) {
            var res = [];
            for (var i = 0; i < data.length; i++) {
                var geoCoord = geoCoordMap[data[i].name];
                if (geoCoord) {
                    res.push({
                        name: data[i].name,
                        value: geoCoord.concat(data[i].value)
                    });
                }
            }
            return res;
        };

        option = {
            title: {
                text: '全国主要城市空气质量 - 百度地图',
                subtext: 'data from PM25.in',
                sublink: 'http://www.pm25.in',
                left: 'center'
            },
            tooltip: {
                trigger: 'item'
            },
            bmap: {
                center: [104.114129, 37.550339],
                zoom: 5,
                roam: true,
                mapStyle: {
                    styleJson: [{
                        'featureType': 'water',
                        'elementType': 'all',
                        'stylers': {
                            'color': '#d1d1d1'
                        }
                    }, {
                        'featureType': 'land',
                        'elementType': 'all',
                        'stylers': {
                            'color': '#f3f3f3'
                        }
                    }, {
                        'featureType': 'railway',
                        'elementType': 'all',
                        'stylers': {
                            'visibility': 'off'
                        }
                    }, {
                        'featureType': 'highway',
                        'elementType': 'all',
                        'stylers': {
                            'color': '#fdfdfd'
                        }
                    }, {
                        'featureType': 'highway',
                        'elementType': 'labels',
                        'stylers': {
                            'visibility': 'off'
                        }
                    }, {
                        'featureType': 'arterial',
                        'elementType': 'geometry',
                        'stylers': {
                            'color': '#fefefe'
                        }
                    }, {
                        'featureType': 'arterial',
                        'elementType': 'geometry.fill',
                        'stylers': {
                            'color': '#fefefe'
                        }
                    }, {
                        'featureType': 'poi',
                        'elementType': 'all',
                        'stylers': {
                            'visibility': 'off'
                        }
                    }, {
                        'featureType': 'green',
                        'elementType': 'all',
                        'stylers': {
                            'visibility': 'off'
                        }
                    }, {
                        'featureType': 'subway',
                        'elementType': 'all',
                        'stylers': {
                            'visibility': 'off'
                        }
                    }, {
                        'featureType': 'manmade',
                        'elementType': 'all',
                        'stylers': {
                            'color': '#d1d1d1'
                        }
                    }, {
                        'featureType': 'local',
                        'elementType': 'all',
                        'stylers': {
                            'color': '#d1d1d1'
                        }
                    }, {
                        'featureType': 'arterial',
                        'elementType': 'labels',
                        'stylers': {
                            'visibility': 'off'
                        }
                    }, {
                        'featureType': 'boundary',
                        'elementType': 'all',
                        'stylers': {
                            'color': '#fefefe'
                        }
                    }, {
                        'featureType': 'building',
                        'elementType': 'all',
                        'stylers': {
                            'color': '#d1d1d1'
                        }
                    }, {
                        'featureType': 'label',
                        'elementType': 'labels.text.fill',
                        'stylers': {
                            'color': '#999999'
                        }
                    }]
                }
            },
            series: [
                {
                    name: 'pm2.5',
                    type: 'scatter',
                    coordinateSystem: 'bmap',
                    data: convertData(data),
                    symbolSize: function (val) {
                        return val[2] / 10;
                    },
                    label: {
                        normal: {
                            formatter: '{b}',
                            position: 'right',
                            show: false
                        },
                        emphasis: {
                            show: true
                        }
                    },
                    itemStyle: {
                        normal: {
                            color: 'purple'
                        }
                    }
                },
                {
                    name: 'Top 5',
                    type: 'effectScatter',
                    coordinateSystem: 'bmap',
                    data: convertData(data.sort(function (a, b) {
                        return b.value - a.value;
                    }).slice(0, 6)),
                    symbolSize: function (val) {
                        return val[2] / 10;
                    },
                    showEffectOn: 'render',
                    rippleEffect: {
                        brushType: 'stroke'
                    },
                    hoverAnimation: true,
                    label: {
                        normal: {
                            formatter: '{b}',
                            position: 'right',
                            show: true
                        }
                    },
                    itemStyle: {
                        normal: {
                            color: 'purple',
                            shadowBlur: 10,
                            shadowColor: '#333'
                        }
                    },
                    zlevel: 1
                }
            ]
        };

        myChart1.setOption(option);
</script>
<body>

//已解决 需要引入必要的控件

<%--引入echarts控件--%>
    <script src="/erzhentang/FR-LIB/incubator-echarts-4.4.0/dist/echarts.js"></script>
    <!-- 引入 vintage 主题 -->
    <script src="/erzhentang/FR-LIB/incubator-echarts-4.4.0/theme/vintage.js"></script>
    <%--引入地图所需控件--%>
    <script type="text/javascript" src="https://www.echartsjs.com/examples/vendors/lodash.js"></script>
    <script type="text/javascript" src="https://www.echartsjs.com/examples/javascripts/common.js"></script>
    <script type="text/javascript">function changeLang(lang) {
        if (lang === 'en') {
            if (location.hostname !== 'echarts.apache.org') {
                var re = new RegExp('/zh/', 'g');
                var pathname = location.pathname.replace(re, '/en/');

                var url = 'https://echarts.apache.org' + pathname
                    + location.search + location.hash;
                location.href = url;
                return;
            }
        }
        location.href = location.href.replace(
            new RegExp('/(zh|en)/', 'g'), '/' + lang + '/'
        );
    }

    window.ROOT_PATH = 'https://www.echartsjs.com/examples/';
    </script>
    <script type="text/javascript" src="https://www.echartsjs.com/examples/vendors/dat.gui.min.js"></script>
    <script type="text/javascript" src="https://www.echartsjs.com/examples/vendors/ace/src/ace.js"></script>
    <script type="text/javascript" src="https://www.echartsjs.com/examples/vendors/ace/src/ext-language_tools.js"></script>
    <script type="text/javascript" src="https://www.echartsjs.com/examples/javascripts/editor.js?_v_=1571170137685"></script>
    <script type="text/javascript" src="https://www.echartsjs.com/examples/vendors/echarts-stat/ecStat.min.js?_v_=1571170137685"></script>
    <script type="text/javascript" src="https://www.echartsjs.com/examples/vendors/echarts/echarts.min.js?_v_=1571170137685"></script>
    <script type="text/javascript" src="https://www.echartsjs.com/examples/vendors/echarts/map/js/china.js?_v_=1571170137685"></script>
    <script type="text/javascript" src="https://www.echartsjs.com/examples/vendors/echarts/map/js/world.js?_v_=1571170137685"></script>
    <script type="text/javascript" src="https://www.echartsjs.com/examples/vendors/echarts/extension/dataTool.js?_v_=1571170137685"></script>
    <script type="text/javascript" src="https://www.echartsjs.com/examples/vendors/echarts/extension/bmap.js?_v_=1571170137685"></script>
    <script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&amp;ak=KOmVjPVUAey1G2E8zNhPiuQ6QiEmAwZu&amp;__ec_v__=20190126"></script>
    <script type="text/javascript" src="https://api.map.baidu.com/getscript?v=2.0&amp;ak=KOmVjPVUAey1G2E8zNhPiuQ6QiEmAwZu&amp;services=&amp;t=20190622163250"></script>
    <script type="text/javascript">document.getElementById('nav-examples').className = 'active';</script>
    <!-- Baidu Tongji-->
    <script type="text/javascript">var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?54b918eee37cb8a7045f0fd0f0b24395";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
    </script>
    <!-- Google Analytics-->
    <script type="text/javascript" async="" src="https://www.googletagmanager.com/gtag/js?id=UA-141228404-1"></script>
    <script type="text/javascript">window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());
    gtag('config', 'UA-141228404-1');
    </script>

2个回答

<!DOCTYPE html>















<br> var dom = document.getElementById(&quot;container&quot;);<br> var myChart = echarts.init(dom);<br> var app = {};<br> option = null;<br> var data = [<br> {name: &#39;海门&#39;, value: 9},<br> {name: &#39;鄂尔多斯&#39;, value: 12},<br> {name: &#39;招远&#39;, value: 12},<br> {name: &#39;舟山&#39;, value: 12},<br> {name: &#39;齐齐哈尔&#39;, value: 14},<br> {name: &#39;盐城&#39;, value: 15},<br> {name: &#39;赤峰&#39;, value: 16},<br> {name: &#39;青岛&#39;, value: 18},<br> {name: &#39;乳山&#39;, value: 18},<br> {name: &#39;金昌&#39;, value: 19},<br> {name: &#39;泉州&#39;, value: 21},<br> {name: &#39;莱西&#39;, value: 21},<br> {name: &#39;日照&#39;, value: 21},<br> {name: &#39;胶南&#39;, value: 22},<br> {name: &#39;南通&#39;, value: 23},<br> {name: &#39;拉萨&#39;, value: 24},<br> {name: &#39;云浮&#39;, value: 24},<br> {name: &#39;梅州&#39;, value: 25},<br> {name: &#39;文登&#39;, value: 25},<br> {name: &#39;上海&#39;, value: 25},<br> {name: &#39;攀枝花&#39;, value: 25},<br> {name: &#39;威海&#39;, value: 25},<br> {name: &#39;承德&#39;, value: 25},<br> {name: &#39;厦门&#39;, value: 26},<br> {name: &#39;汕尾&#39;, value: 26},<br> {name: &#39;潮州&#39;, value: 26},<br> {name: &#39;丹东&#39;, value: 27},<br> {name: &#39;太仓&#39;, value: 27},<br> {name: &#39;曲靖&#39;, value: 27},<br> {name: &#39;烟台&#39;, value: 28},<br> {name: &#39;福州&#39;, value: 29},<br> {name: &#39;瓦房店&#39;, value: 30},<br> {name: &#39;即墨&#39;, value: 30},<br> {name: &#39;抚顺&#39;, value: 31},<br> {name: &#39;玉溪&#39;, value: 31},<br> {name: &#39;张家口&#39;, value: 31},<br> {name: &#39;阳泉&#39;, value: 31},<br> {name: &#39;莱州&#39;, value: 32},<br> {name: &#39;湖州&#39;, value: 32},<br> {name: &#39;汕头&#39;, value: 32},<br> {name: &#39;昆山&#39;, value: 33},<br> {name: &#39;宁波&#39;, value: 33},<br> {name: &#39;湛江&#39;, value: 33},<br> {name: &#39;揭阳&#39;, value: 34},<br> {name: &#39;荣成&#39;, value: 34},<br> {name: &#39;连云港&#39;, value: 35},<br> {name: &#39;葫芦岛&#39;, value: 35},<br> {name: &#39;常熟&#39;, value: 36},<br> {name: &#39;东莞&#39;, value: 36},<br> {name: &#39;河源&#39;, value: 36},<br> {name: &#39;淮安&#39;, value: 36},<br> {name: &#39;泰州&#39;, value: 36},<br> {name: &#39;南宁&#39;, value: 37},<br> {name: &#39;营口&#39;, value: 37},<br> {name: &#39;惠州&#39;, value: 37},<br> {name: &#39;江阴&#39;, value: 37},<br> {name: &#39;蓬莱&#39;, value: 37},<br> {name: &#39;韶关&#39;, value: 38},<br> {name: &#39;嘉峪关&#39;, value: 38},<br> {name: &#39;广州&#39;, value: 38},<br> {name: &#39;延安&#39;, value: 38},<br> {name: &#39;太原&#39;, value: 39},<br> {name: &#39;清远&#39;, value: 39},<br> {name: &#39;中山&#39;, value: 39},<br> {name: &#39;昆明&#39;, value: 39},<br> {name: &#39;寿光&#39;, value: 40},<br> {name: &#39;盘锦&#39;, value: 40},<br> {name: &#39;长治&#39;, value: 41},<br> {name: &#39;深圳&#39;, value: 41},<br> {name: &#39;珠海&#39;, value: 42},<br> {name: &#39;宿迁&#39;, value: 43},<br> {name: &#39;咸阳&#39;, value: 43},<br> {name: &#39;铜川&#39;, value: 44},<br> {name: &#39;平度&#39;, value: 44},<br> {name: &#39;佛山&#39;, value: 44},<br> {name: &#39;海口&#39;, value: 44},<br> {name: &#39;江门&#39;, value: 45},<br> {name: &#39;章丘&#39;, value: 45},<br> {name: &#39;肇庆&#39;, value: 46},<br> {name: &#39;大连&#39;, value: 47},<br> {name: &#39;临汾&#39;, value: 47},<br> {name: &#39;吴江&#39;, value: 47},<br> {name: &#39;石嘴山&#39;, value: 49},<br> {name: &#39;沈阳&#39;, value: 50},<br> {name: &#39;苏州&#39;, value: 50},<br> {name: &#39;茂名&#39;, value: 50},<br> {name: &#39;嘉兴&#39;, value: 51},<br> {name: &#39;长春&#39;, value: 51},<br> {name: &#39;胶州&#39;, value: 52},<br> {name: &#39;银川&#39;, value: 52},<br> {name: &#39;张家港&#39;, value: 52},<br> {name: &#39;三门峡&#39;, value: 53},<br> {name: &#39;锦州&#39;, value: 54},<br> {name: &#39;南昌&#39;, value: 54},<br> {name: &#39;柳州&#39;, value: 54},<br> {name: &#39;三亚&#39;, value: 54},<br> {name: &#39;自贡&#39;, value: 56},<br> {name: &#39;吉林&#39;, value: 56},<br> {name: &#39;阳江&#39;, value: 57},<br> {name: &#39;泸州&#39;, value: 57},<br> {name: &#39;西宁&#39;, value: 57},<br> {name: &#39;宜宾&#39;, value: 58},<br> {name: &#39;呼和浩特&#39;, value: 58},<br> {name: &#39;成都&#39;, value: 58},<br> {name: &#39;大同&#39;, value: 58},<br> {name: &#39;镇江&#39;, value: 59},<br> {name: &#39;桂林&#39;, value: 59},<br> {name: &#39;张家界&#39;, value: 59},<br> {name: &#39;宜兴&#39;, value: 59},<br> {name: &#39;北海&#39;, value: 60},<br> {name: &#39;西安&#39;, value: 61},<br> {name: &#39;金坛&#39;, value: 62},<br> {name: &#39;东营&#39;, value: 62},<br> {name: &#39;牡丹江&#39;, value: 63},<br> {name: &#39;遵义&#39;, value: 63},<br> {name: &#39;绍兴&#39;, value: 63},<br> {name: &#39;扬州&#39;, value: 64},<br> {name: &#39;常州&#39;, value: 64},<br> {name: &#39;潍坊&#39;, value: 65},<br> {name: &#39;重庆&#39;, value: 66},<br> {name: &#39;台州&#39;, value: 67},<br> {name: &#39;南京&#39;, value: 67},<br> {name: &#39;滨州&#39;, value: 70},<br> {name: &#39;贵阳&#39;, value: 71},<br> {name: &#39;无锡&#39;, value: 71},<br> {name: &#39;本溪&#39;, value: 71},<br> {name: &#39;克拉玛依&#39;, value: 72},<br> {name: &#39;渭南&#39;, value: 72},<br> {name: &#39;马鞍山&#39;, value: 72},<br> {name: &#39;宝鸡&#39;, value: 72},<br> {name: &#39;焦作&#39;, value: 75},<br> {name: &#39;句容&#39;, value: 75},<br> {name: &#39;北京&#39;, value: 79},<br> {name: &#39;徐州&#39;, value: 79},<br> {name: &#39;衡水&#39;, value: 80},<br> {name: &#39;包头&#39;, value: 80},<br> {name: &#39;绵阳&#39;, value: 80},<br> {name: &#39;乌鲁木齐&#39;, value: 84},<br> {name: &#39;枣庄&#39;, value: 84},<br> {name: &#39;杭州&#39;, value: 84},<br> {name: &#39;淄博&#39;, value: 85},<br> {name: &#39;鞍山&#39;, value: 86},<br> {name: &#39;溧阳&#39;, value: 86},<br> {name: &#39;库尔勒&#39;, value: 86},<br> {name: &#39;安阳&#39;, value: 90},<br> {name: &#39;开封&#39;, value: 90},<br> {name: &#39;济南&#39;, value: 92},<br> {name: &#39;德阳&#39;, value: 93},<br> {name: &#39;温州&#39;, value: 95},<br> {name: &#39;九江&#39;, value: 96},<br> {name: &#39;邯郸&#39;, value: 98},<br> {name: &#39;临安&#39;, value: 99},<br> {name: &#39;兰州&#39;, value: 99},<br> {name: &#39;沧州&#39;, value: 100},<br> {name: &#39;临沂&#39;, value: 103},<br> {name: &#39;南充&#39;, value: 104},<br> {name: &#39;天津&#39;, value: 105},<br> {name: &#39;富阳&#39;, value: 106},<br> {name: &#39;泰安&#39;, value: 112},<br> {name: &#39;诸暨&#39;, value: 112},<br> {name: &#39;郑州&#39;, value: 113},<br> {name: &#39;哈尔滨&#39;, value: 114},<br> {name: &#39;聊城&#39;, value: 116},<br> {name: &#39;芜湖&#39;, value: 117},<br> {name: &#39;唐山&#39;, value: 119},<br> {name: &#39;平顶山&#39;, value: 119},<br> {name: &#39;邢台&#39;, value: 119},<br> {name: &#39;德州&#39;, value: 120},<br> {name: &#39;济宁&#39;, value: 120},<br> {name: &#39;荆州&#39;, value: 127},<br> {name: &#39;宜昌&#39;, value: 130},<br> {name: &#39;义乌&#39;, value: 132},<br> {name: &#39;丽水&#39;, value: 133},<br> {name: &#39;洛阳&#39;, value: 134},<br> {name: &#39;秦皇岛&#39;, value: 136},<br> {name: &#39;株洲&#39;, value: 143},<br> {name: &#39;石家庄&#39;, value: 147},<br> {name: &#39;莱芜&#39;, value: 148},<br> {name: &#39;常德&#39;, value: 152},<br> {name: &#39;保定&#39;, value: 153},<br> {name: &#39;湘潭&#39;, value: 154},<br> {name: &#39;金华&#39;, value: 157},<br> {name: &#39;岳阳&#39;, value: 169},<br> {name: &#39;长沙&#39;, value: 175},<br> {name: &#39;衢州&#39;, value: 177},<br> {name: &#39;廊坊&#39;, value: 193},<br> {name: &#39;菏泽&#39;, value: 194},<br> {name: &#39;合肥&#39;, value: 229},<br> {name: &#39;武汉&#39;, value: 273},<br> {name: &#39;大庆&#39;, value: 279}<br> ];<br> var geoCoordMap = {<br> &#39;海门&#39;:[121.15,31.89],<br> &#39;鄂尔多斯&#39;:[109.781327,39.608266],<br> &#39;招远&#39;:[120.38,37.35],<br> &#39;舟山&#39;:[122.207216,29.985295],<br> &#39;齐齐哈尔&#39;:[123.97,47.33],<br> &#39;盐城&#39;:[120.13,33.38],<br> &#39;赤峰&#39;:[118.87,42.28],<br> &#39;青岛&#39;:[120.33,36.07],<br> &#39;乳山&#39;:[121.52,36.89],<br> &#39;金昌&#39;:[102.188043,38.520089],<br> &#39;泉州&#39;:[118.58,24.93],<br> &#39;莱西&#39;:[120.53,36.86],<br> &#39;日照&#39;:[119.46,35.42],<br> &#39;胶南&#39;:[119.97,35.88],<br> &#39;南通&#39;:[121.05,32.08],<br> &#39;拉萨&#39;:[91.11,29.97],<br> &#39;云浮&#39;:[112.02,22.93],<br> &#39;梅州&#39;:[116.1,24.55],<br> &#39;文登&#39;:[122.05,37.2],<br> &#39;上海&#39;:[121.48,31.22],<br> &#39;攀枝花&#39;:[101.718637,26.582347],<br> &#39;威海&#39;:[122.1,37.5],<br> &#39;承德&#39;:[117.93,40.97],<br> &#39;厦门&#39;:[118.1,24.46],<br> &#39;汕尾&#39;:[115.375279,22.786211],<br> &#39;潮州&#39;:[116.63,23.68],<br> &#39;丹东&#39;:[124.37,40.13],<br> &#39;太仓&#39;:[121.1,31.45],<br> &#39;曲靖&#39;:[103.79,25.51],<br> &#39;烟台&#39;:[121.39,37.52],<br> &#39;福州&#39;:[119.3,26.08],<br> &#39;瓦房店&#39;:[121.979603,39.627114],<br> &#39;即墨&#39;:[120.45,36.38],<br> &#39;抚顺&#39;:[123.97,41.97],<br> &#39;玉溪&#39;:[102.52,24.35],<br> &#39;张家口&#39;:[114.87,40.82],<br> &#39;阳泉&#39;:[113.57,37.85],<br> &#39;莱州&#39;:[119.942327,37.177017],<br> &#39;湖州&#39;:[120.1,30.86],<br> &#39;汕头&#39;:[116.69,23.39],<br> &#39;昆山&#39;:[120.95,31.39],<br> &#39;宁波&#39;:[121.56,29.86],<br> &#39;湛江&#39;:[110.359377,21.270708],<br> &#39;揭阳&#39;:[116.35,23.55],<br> &#39;荣成&#39;:[122.41,37.16],<br> &#39;连云港&#39;:[119.16,34.59],<br> &#39;葫芦岛&#39;:[120.836932,40.711052],<br> &#39;常熟&#39;:[120.74,31.64],<br> &#39;东莞&#39;:[113.75,23.04],<br> &#39;河源&#39;:[114.68,23.73],<br> &#39;淮安&#39;:[119.15,33.5],<br> &#39;泰州&#39;:[119.9,32.49],<br> &#39;南宁&#39;:[108.33,22.84],<br> &#39;营口&#39;:[122.18,40.65],<br> &#39;惠州&#39;:[114.4,23.09],<br> &#39;江阴&#39;:[120.26,31.91],<br> &#39;蓬莱&#39;:[120.75,37.8],<br> &#39;韶关&#39;:[113.62,24.84],<br> &#39;嘉峪关&#39;:[98.289152,39.77313],<br> &#39;广州&#39;:[113.23,23.16],<br> &#39;延安&#39;:[109.47,36.6],<br> &#39;太原&#39;:[112.53,37.87],<br> &#39;清远&#39;:[113.01,23.7],<br> &#39;中山&#39;:[113.38,22.52],<br> &#39;昆明&#39;:[102.73,25.04],<br> &#39;寿光&#39;:[118.73,36.86],<br> &#39;盘锦&#39;:[122.070714,41.119997],<br> &#39;长治&#39;:[113.08,36.18],<br> &#39;深圳&#39;:[114.07,22.62],<br> &#39;珠海&#39;:[113.52,22.3],<br> &#39;宿迁&#39;:[118.3,33.96],<br> &#39;咸阳&#39;:[108.72,34.36],<br> &#39;铜川&#39;:[109.11,35.09],<br> &#39;平度&#39;:[119.97,36.77],<br> &#39;佛山&#39;:[113.11,23.05],<br> &#39;海口&#39;:[110.35,20.02],<br> &#39;江门&#39;:[113.06,22.61],<br> &#39;章丘&#39;:[117.53,36.72],<br> &#39;肇庆&#39;:[112.44,23.05],<br> &#39;大连&#39;:[121.62,38.92],<br> &#39;临汾&#39;:[111.5,36.08],<br> &#39;吴江&#39;:[120.63,31.16],<br> &#39;石嘴山&#39;:[106.39,39.04],<br> &#39;沈阳&#39;:[123.38,41.8],<br> &#39;苏州&#39;:[120.62,31.32],<br> &#39;茂名&#39;:[110.88,21.68],<br> &#39;嘉兴&#39;:[120.76,30.77],<br> &#39;长春&#39;:[125.35,43.88],<br> &#39;胶州&#39;:[120.03336,36.264622],<br> &#39;银川&#39;:[106.27,38.47],<br> &#39;张家港&#39;:[120.555821,31.875428],<br> &#39;三门峡&#39;:[111.19,34.76],<br> &#39;锦州&#39;:[121.15,41.13],<br> &#39;南昌&#39;:[115.89,28.68],<br> &#39;柳州&#39;:[109.4,24.33],<br> &#39;三亚&#39;:[109.511909,18.252847],<br> &#39;自贡&#39;:[104.778442,29.33903],<br> &#39;吉林&#39;:[126.57,43.87],<br> &#39;阳江&#39;:[111.95,21.85],<br> &#39;泸州&#39;:[105.39,28.91],<br> &#39;西宁&#39;:[101.74,36.56],<br> &#39;宜宾&#39;:[104.56,29.77],<br> &#39;呼和浩特&#39;:[111.65,40.82],<br> &#39;成都&#39;:[104.06,30.67],<br> &#39;大同&#39;:[113.3,40.12],<br> &#39;镇江&#39;:[119.44,32.2],<br> &#39;桂林&#39;:[110.28,25.29],<br> &#39;张家界&#39;:[110.479191,29.117096],<br> &#39;宜兴&#39;:[119.82,31.36],<br> &#39;北海&#39;:[109.12,21.49],<br> &#39;西安&#39;:[108.95,34.27],<br> &#39;金坛&#39;:[119.56,31.74],<br> &#39;东营&#39;:[118.49,37.46],<br> &#39;牡丹江&#39;:[129.58,44.6],<br> &#39;遵义&#39;:[106.9,27.7],<br> &#39;绍兴&#39;:[120.58,30.01],<br> &#39;扬州&#39;:[119.42,32.39],<br> &#39;常州&#39;:[119.95,31.79],<br> &#39;潍坊&#39;:[119.1,36.62],<br> &#39;重庆&#39;:[106.54,29.59],<br> &#39;台州&#39;:[121.420757,28.656386],<br> &#39;南京&#39;:[118.78,32.04],<br> &#39;滨州&#39;:[118.03,37.36],<br> &#39;贵阳&#39;:[106.71,26.57],<br> &#39;无锡&#39;:[120.29,31.59],<br> &#39;本溪&#39;:[123.73,41.3],<br> &#39;克拉玛依&#39;:[84.77,45.59],<br> &#39;渭南&#39;:[109.5,34.52],<br> &#39;马鞍山&#39;:[118.48,31.56],<br> &#39;宝鸡&#39;:[107.15,34.38],<br> &#39;焦作&#39;:[113.21,35.24],<br> &#39;句容&#39;:[119.16,31.95],<br> &#39;北京&#39;:[116.46,39.92],<br> &#39;徐州&#39;:[117.2,34.26],<br> &#39;衡水&#39;:[115.72,37.72],<br> &#39;包头&#39;:[110,40.58],<br> &#39;绵阳&#39;:[104.73,31.48],<br> &#39;乌鲁木齐&#39;:[87.68,43.77],<br> &#39;枣庄&#39;:[117.57,34.86],<br> &#39;杭州&#39;:[120.19,30.26],<br> &#39;淄博&#39;:[118.05,36.78],<br> &#39;鞍山&#39;:[122.85,41.12],<br> &#39;溧阳&#39;:[119.48,31.43],<br> &#39;库尔勒&#39;:[86.06,41.68],<br> &#39;安阳&#39;:[114.35,36.1],<br> &#39;开封&#39;:[114.35,34.79],<br> &#39;济南&#39;:[117,36.65],<br> &#39;德阳&#39;:[104.37,31.13],<br> &#39;温州&#39;:[120.65,28.01],<br> &#39;九江&#39;:[115.97,29.71],<br> &#39;邯郸&#39;:[114.47,36.6],<br> &#39;临安&#39;:[119.72,30.23],<br> &#39;兰州&#39;:[103.73,36.03],<br> &#39;沧州&#39;:[116.83,38.33],<br> &#39;临沂&#39;:[118.35,35.05],<br> &#39;南充&#39;:[106.110698,30.837793],<br> &#39;天津&#39;:[117.2,39.13],<br> &#39;富阳&#39;:[119.95,30.07],<br> &#39;泰安&#39;:[117.13,36.18],<br> &#39;诸暨&#39;:[120.23,29.71],<br> &#39;郑州&#39;:[113.65,34.76],<br> &#39;哈尔滨&#39;:[126.63,45.75],<br> &#39;聊城&#39;:[115.97,36.45],<br> &#39;芜湖&#39;:[118.38,31.33],<br> &#39;唐山&#39;:[118.02,39.63],<br> &#39;平顶山&#39;:[113.29,33.75],<br> &#39;邢台&#39;:[114.48,37.05],<br> &#39;德州&#39;:[116.29,37.45],<br> &#39;济宁&#39;:[116.59,35.38],<br> &#39;荆州&#39;:[112.239741,30.335165],<br> &#39;宜昌&#39;:[111.3,30.7],<br> &#39;义乌&#39;:[120.06,29.32],<br> &#39;丽水&#39;:[119.92,28.45],<br> &#39;洛阳&#39;:[112.44,34.7],<br> &#39;秦皇岛&#39;:[119.57,39.95],<br> &#39;株洲&#39;:[113.16,27.83],<br> &#39;石家庄&#39;:[114.48,38.03],<br> &#39;莱芜&#39;:[117.67,36.19],<br> &#39;常德&#39;:[111.69,29.05],<br> &#39;保定&#39;:[115.48,38.85],<br> &#39;湘潭&#39;:[112.91,27.87],<br> &#39;金华&#39;:[119.64,29.12],<br> &#39;岳阳&#39;:[113.09,29.37],<br> &#39;长沙&#39;:[113,28.21],<br> &#39;衢州&#39;:[118.88,28.97],<br> &#39;廊坊&#39;:[116.7,39.53],<br> &#39;菏泽&#39;:[115.480656,35.23375],<br> &#39;合肥&#39;:[117.27,31.86],<br> &#39;武汉&#39;:[114.31,30.52],<br> &#39;大庆&#39;:[125.03,46.58]<br> };</p> <p>var convertData = function (data) {<br> var res = [];<br> for (var i = 0; i &lt; data.length; i++) {<br> var geoCoord = geoCoordMap[data[i].name];<br> if (geoCoord) {<br> res.push({<br> name: data[i].name,<br> value: geoCoord.concat(data[i].value)<br> });<br> }<br> }<br> return res;<br> };</p> <p>option = {<br> title: {<br> text: &#39;全国主要城市空气质量 - 百度地图&#39;,<br> subtext: &#39;data from PM25.in&#39;,<br> sublink: &#39;<a href="http://www.pm25.in">http://www.pm25.in</a>&#39;,<br> left: &#39;center&#39;<br> },<br> tooltip : {<br> trigger: &#39;item&#39;<br> },<br> bmap: {<br> center: [104.114129, 37.550339],<br> zoom: 5,<br> roam: true,<br> mapStyle: {<br> styleJson: [{<br> &#39;featureType&#39;: &#39;water&#39;,<br> &#39;elementType&#39;: &#39;all&#39;,<br> &#39;stylers&#39;: {<br> &#39;color&#39;: &#39;#d1d1d1&#39;<br> }<br> }, {<br> &#39;featureType&#39;: &#39;land&#39;,<br> &#39;elementType&#39;: &#39;all&#39;,<br> &#39;stylers&#39;: {<br> &#39;color&#39;: &#39;#f3f3f3&#39;<br> }<br> }, {<br> &#39;featureType&#39;: &#39;railway&#39;,<br> &#39;elementType&#39;: &#39;all&#39;,<br> &#39;stylers&#39;: {<br> &#39;visibility&#39;: &#39;off&#39;<br> }<br> }, {<br> &#39;featureType&#39;: &#39;highway&#39;,<br> &#39;elementType&#39;: &#39;all&#39;,<br> &#39;stylers&#39;: {<br> &#39;color&#39;: &#39;#fdfdfd&#39;<br> }<br> }, {<br> &#39;featureType&#39;: &#39;highway&#39;,<br> &#39;elementType&#39;: &#39;labels&#39;,<br> &#39;stylers&#39;: {<br> &#39;visibility&#39;: &#39;off&#39;<br> }<br> }, {<br> &#39;featureType&#39;: &#39;arterial&#39;,<br> &#39;elementType&#39;: &#39;geometry&#39;,<br> &#39;stylers&#39;: {<br> &#39;color&#39;: &#39;#fefefe&#39;<br> }<br> }, {<br> &#39;featureType&#39;: &#39;arterial&#39;,<br> &#39;elementType&#39;: &#39;geometry.fill&#39;,<br> &#39;stylers&#39;: {<br> &#39;color&#39;: &#39;#fefefe&#39;<br> }<br> }, {<br> &#39;featureType&#39;: &#39;poi&#39;,<br> &#39;elementType&#39;: &#39;all&#39;,<br> &#39;stylers&#39;: {<br> &#39;visibility&#39;: &#39;off&#39;<br> }<br> }, {<br> &#39;featureType&#39;: &#39;green&#39;,<br> &#39;elementType&#39;: &#39;all&#39;,<br> &#39;stylers&#39;: {<br> &#39;visibility&#39;: &#39;off&#39;<br> }<br> }, {<br> &#39;featureType&#39;: &#39;subway&#39;,<br> &#39;elementType&#39;: &#39;all&#39;,<br> &#39;stylers&#39;: {<br> &#39;visibility&#39;: &#39;off&#39;<br> }<br> }, {<br> &#39;featureType&#39;: &#39;manmade&#39;,<br> &#39;elementType&#39;: &#39;all&#39;,<br> &#39;stylers&#39;: {<br> &#39;color&#39;: &#39;#d1d1d1&#39;<br> }<br> }, {<br> &#39;featureType&#39;: &#39;local&#39;,<br> &#39;elementType&#39;: &#39;all&#39;,<br> &#39;stylers&#39;: {<br> &#39;color&#39;: &#39;#d1d1d1&#39;<br> }<br> }, {<br> &#39;featureType&#39;: &#39;arterial&#39;,<br> &#39;elementType&#39;: &#39;labels&#39;,<br> &#39;stylers&#39;: {<br> &#39;visibility&#39;: &#39;off&#39;<br> }<br> }, {<br> &#39;featureType&#39;: &#39;boundary&#39;,<br> &#39;elementType&#39;: &#39;all&#39;,<br> &#39;stylers&#39;: {<br> &#39;color&#39;: &#39;#fefefe&#39;<br> }<br> }, {<br> &#39;featureType&#39;: &#39;building&#39;,<br> &#39;elementType&#39;: &#39;all&#39;,<br> &#39;stylers&#39;: {<br> &#39;color&#39;: &#39;#d1d1d1&#39;<br> }<br> }, {<br> &#39;featureType&#39;: &#39;label&#39;,<br> &#39;elementType&#39;: &#39;labels.text.fill&#39;,<br> &#39;stylers&#39;: {<br> &#39;color&#39;: &#39;#999999&#39;<br> }<br> }]<br> }<br> },<br> series : [<br> {<br> name: &#39;pm2.5&#39;,<br> type: &#39;scatter&#39;,<br> coordinateSystem: &#39;bmap&#39;,<br> data: convertData(data),<br> symbolSize: function (val) {<br> return val[2] / 10;<br> },<br> label: {<br> normal: {<br> formatter: &#39;{b}&#39;,<br> position: &#39;right&#39;,<br> show: false<br> },<br> emphasis: {<br> show: true<br> }<br> },<br> itemStyle: {<br> normal: {<br> color: &#39;purple&#39;<br> }<br> }<br> },<br> {<br> name: &#39;Top 5&#39;,<br> type: &#39;effectScatter&#39;,<br> coordinateSystem: &#39;bmap&#39;,<br> data: convertData(data.sort(function (a, b) {<br> return b.value - a.value;<br> }).slice(0, 6)),<br> symbolSize: function (val) {<br> return val[2] / 10;<br> },<br> showEffectOn: &#39;render&#39;,<br> rippleEffect: {<br> brushType: &#39;stroke&#39;<br> },<br> hoverAnimation: true,<br> label: {<br> normal: {<br> formatter: &#39;{b}&#39;,<br> position: &#39;right&#39;,<br> show: true<br> }<br> },<br> itemStyle: {<br> normal: {<br> color: &#39;purple&#39;,<br> shadowBlur: 10,<br> shadowColor: &#39;#333&#39;<br> }<br> },<br> zlevel: 1<br> }<br> ]<br> };;<br> if (option &amp;&amp; typeof option === &quot;object&quot;) {<br> myChart.setOption(option, true);<br> }<br>

u012503756
bulidfer 阁下代码粘的有些乱 但是我觉得是不是没有引入需要的js文件
大约一个月之前 回复

需要引入地图的geo数据,china.json

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
link函数中如何实现传控件的功能?如何将控件放在函数中调用?
-
请问循环语句对于循环类型不同的控件怎么一次调用成功,对于控件实现循环的调用?
-
用户控件如何调用?类的对象如何调用呢?
-
写了ocx控件 在网页中调用显示 对象不支持此属性或方法
-
请问vb6.0中文编程平台上怎么使用控件参照的方式调用mscom通讯控件?
-
Visula Basic怎么不通过控件的方式直接调用控件的界面
-
通讯控件在连接和调用gsm调制解调前怎么进行设置和配置?
-
请问怎么使用循环语句在循环语句内调用ctype实现对控件的列举和调用的过程和代码的方式?
-
如何在vb6.0中实现循环语句的循环变量作为窗体控件的控件名来调用?
-
请问vb6.0中文版怎么实现使用控件参照的办法调用mscom控件实现载波调制的输出结果?
-
怎么实现标准模块中挂一个窗体外的控件放在代码里调用,并且传给参量到界面?
-
怎么使用vb编程实现用activx实现控件在代码中调用,作为启动对象?
-
求问运用vb6.0编程开发语言怎么实现循环对控件编写的属性调用的判断?
-
求问怎么在vb6.0开发系统中实现对窗体上控件的控件值得选择调用?
-
控件里面嵌套控件的调用,ocx的内存是放在外侧ocx内存里的么?
-
请问怎么在vb6.0编程开发平台上实现循环语句对窗体上多个控件的属性的调用?
-
winfrom 动态添加控件,怎么使用控件事件,
-
echarts结合百度地图,然后数据残留的问题。
-
Linux文件操作高频使用命令
文章目录0.新建操作:1.查看操作2.删除操作3.复制操作4.移动操作:5.重命名操作:6.解压压缩操作 0.新建操作: mkdir abc #新建一个文件夹 touch abc.sh #新建一个文件 1.查看操作 查看目录: ll #显示目录文件详细信息 查看文件内容: cat|head|tail命令 cat abc.txt #查看abc的内容 head -5 abc.txt #...
程序员实用工具网站
目录 1、搜索引擎 2、PPT 3、图片操作 4、文件共享 5、应届生招聘 6、程序员面试题库 7、办公、开发软件 8、高清图片、视频素材网站 9、项目开源 10、在线工具宝典大全 程序员开发需要具备良好的信息检索能力,为了备忘(收藏夹真是满了),将开发过程中常用的网站进行整理。 1、搜索引擎 1.1、秘迹搜索 一款无敌有良心、无敌安全的搜索引擎,不会收集私人信息,保...
LeetCode解题汇总目录
此篇为LeetCode刷题的汇总目录,方便大家查找,一起刷题,一起PK交流! 已解题目 考点 LeetCode 1. 两数之和(哈希) LeetCode 2. 两数相加(单链表反转) LeetCode 9. 回文数 LeetCode 11. 盛最多水的容器(双指针) LeetCode 15. 三数之和 LeetCode 17. 电话号码的字母组合(回溯...
全球最厉害的 14 位程序员!
来源 | ITWorld 整理自网络全球最厉害的 14 位程序员是谁?今天就让我们一起来了解一下吧,排名不分先后。01. Jon Skeet个人名望:程序技术问答网站 S...
从入门到精通,Java学习路线导航
引言 最近也有很多人来向我"请教",他们大都是一些刚入门的新手,还不了解这个行业,也不知道从何学起,开始的时候非常迷茫,实在是每天回复很多人也很麻烦,所以在这里统一作个回复吧。 Java学习路线 当然,这里我只是说Java学习路线,因为自己就是学Java的,对Java理当很熟悉,对于其它方面,我也不是很了解。 基础阶段 首先是基础阶段,在基础阶段,我们必须掌握Java基础,Mysql数据库,Ora...
二十出头,老气横秋
有的时候,我们希望年轻人成熟一点,不要巨婴,不要总是等着别人来解救,要自立,要有担当。但有时候吧,发现有些年轻人,似乎过于成熟了,二十来岁的人,感觉怎么就老气横秋的。1、...
我花了一夜用数据结构给女朋友写个H5走迷宫游戏
起因 又到深夜了,我按照以往在csdn和公众号写着数据结构!这占用了我大量的时间!我的超越妹妹严重缺乏陪伴而 怨气满满! 而女朋友时常埋怨,认为数据结构这么抽象难懂的东西没啥作用,常会问道:天天写这玩意,有啥作用。而我答道:能干事情多了,比如写个迷宫小游戏啥的! 当我码完字准备睡觉时:写不好别睡觉! 分析 如果用数据结构与算法造出东西来呢? ...
五分钟小知识:为什么说 ++i 的效率比 i++ 高?
点击蓝色“五分钟学算法”关注我哟加个“星标”,天天中午 12:15,一起学算法作者 | 守望先生来源 | 编程珠玑前言不知道你是否听说过 ++i 比 i++ 快的说法,真...
什么是大公司病(太形象了)
点击蓝色“五分钟学算法”关注我哟加个“星标”,天天中午 12:15,一起学算法作者 | 南之鱼来源 | 芝麻观点(chinamkt)所谓大企业病,一般都具有机构臃肿、多重...
代码整洁 vs 代码肮脏
写出整洁的代码,是每个程序员的追求。《clean code》指出,要想写出好的代码,首先得知道什么是肮脏代码、什么是整洁代码;然后通过大量的刻意练习,才能真正写出整洁的代码。 WTF/min是衡量代码质量的唯一标准,Uncle Bob在书中称糟糕的代码为沼泽(wading),这只突出了我们是糟糕代码的受害者。国内有一个更适合的词汇:屎山,虽然不是很文雅但是更加客观,程序员既是受害者也是加害者。 对...
让程序员崩溃的瞬间(非程序员勿入)
今天给大家带来点快乐,程序员才能看懂。 来源:https://zhuanlan.zhihu.com/p/47066521 1. 公司实习生找 Bug 2.在调试时,将断点设置在错误的位置 3.当我有一个很棒的调试想法时 4.偶然间看到自己多年前写的代码 5.当我第一次启动我的单元测试时 ...
Git 天天用 但是 Git 原理你了解吗?
Git 原理 做技术一定要知其然知其所以然,意思就是:知道它是这样的,更知道它为什么是这样的。我主要通过4块内容来简单介绍 Git 是原理是什么样的。这4块内容如下: Git 存储目录结构介绍 Git 是如何存储的 Git 的对象 Git引用 当然 Git 原理不仅仅包含这些,想要更深入了解请查看官方教程 https://git-scm.com/book/zh/v2/。 本文内容是我在 Git...
为什么面向对象糟透了?
又是周末,编程语言“三巨头”Java, Lisp 和C语言在Hello World咖啡馆聚会。服务员送来咖啡的同时还带来了一张今天的报纸, 三人寒暄了几句, C语言翻开了...
Java 每日算法,三个线程按顺序打印
关于多线程的基础知识,可点击下面链接进行学习。 JAVA\Android 多线程实现方式及并发与同步 题目1 启动3个线程A、B、C,使A打印0,然后B打印1,然后C打印2,A打印3,B打印4,C打印5,依次类推。 public class PrintSequenceThread implements Runnable { private static final Ob...
分享靠写代码赚钱的一些门路
作者 mezod,译者 josephchang10如今,通过自己的代码去赚钱变得越来越简单,不过对很多人来说依然还是很难,因为他们不知道有哪些门路。今天给大家分享一个精彩...
对计算机专业来说学历真的重要吗?
我本科学校是渣渣二本,研究生学校是985,现在毕业五年,校招笔试、面试,社招面试参加了两年了,就我个人的经历来说下这个问题。 这篇文章很长,但绝对是精华,相信我,读完以后,你会知道学历不好的解决方案,记得帮我点赞哦。 先说结论,无论赞不赞同,它本质就是这样:对于技术类工作而言,学历五年以内非常重要,但有办法弥补。五年以后,不重要。 目录: 张雪峰讲述的事实 我看到的事实 为什么会这样 ...
技术人员要拿百万年薪,必须要经历这9个段位
很多人都问,技术人员如何成长,每个阶段又是怎样的,如何才能走出当前的迷茫,实现自我的突破。所以我结合我自己10多年的从业经验,总结了技术人员成长的9个段位,希望对大家的职...
8000字干货:那些很厉害的人是怎么构建知识体系的
本文约8000字,正常阅读需要15~20分钟。读完本文可以获得如下收益: 分辨知识和知识体系的差别 理解如何用八大问发现知识的连接点; 掌握致用类知识体系的构建方法; 能够应用甜蜜区模型找到特定领域来构建知识体系。 1. 知识体系?有必要吗? 小张准备通过跑步锻炼身体,可因为之前听说过小腿变粗、膝盖受伤、猝死等等与跑步有关的意外状况,有点担心自己会掉进各种坑里,就在微信上问朋友圈一直晒跑步...
nginx学习,看这一篇就够了:下载、安装。使用:正向代理、反向代理、负载均衡。常用命令和配置文件
文章目录前言一、nginx简介1. 什么是 nginx 和可以做什么事情2.Nginx 作为 web 服务器3. 正向代理4. 反向代理5. 动静分离6.动静分离二、Nginx 的安装三、 Nginx 的常用命令和配置文件四、 Nginx 配置实例 1 反向代理五、 Nginx 配置实例 2 负载均衡六、 Nginx 配置实例 3 动静分离七、 Nginx 的高可用集群 前言 一、nginx简介...
500行代码,教你用python写个微信飞机大战
这几天在重温微信小游戏的飞机大战,玩着玩着就在思考人生了,这飞机大战怎么就可以做的那么好,操作简单,简单上手。 帮助蹲厕族、YP族、饭圈女孩在无聊之余可以有一样东西让他们振作起来!让他们的左手 / 右手有节奏有韵律的朝着同一个方向来回移动起来! 这是史诗级的发明,是浓墨重彩的一笔,是…… 在一阵抽搐后,我结束了游戏,瞬时觉得一切都索然无味,正在我进入贤者模式时,突然想到,如果我可以让更多人已不同的方式体会到这种美轮美奂的感觉岂不美哉? 所以我打开电脑,创建了一个 `plan_game.py`……
2019诺贝尔经济学奖得主:贫穷的本质是什么?
2019年诺贝尔经济学奖,颁给了来自麻省理工学院的 阿巴希·巴纳吉(Abhijit Vinayak Banerjee)、艾丝特·杜芙若(Esther Duflo)夫妇和哈...
只因写了一段爬虫,公司200多人被抓!
“一个程序员写了个爬虫程序,整个公司200多人被端了。” “不可能吧!” 刚从朋友听到这个消息的时候,我有点不太相信,做为一名程序员来讲,谁还没有写过几段爬虫呢?只因写爬虫程序就被端有点夸张了吧。 朋友说,消息很确认并且已经进入审判阶段了。 01.对消息进一步确认 朋友认识几个律师朋友,和他们有一些业务来往,得知他们想尝试把业务扩展到程序员这个群体。那段时间我刚好离职也有时间,在朋友...
相关热词 c# 增加元素 c#控制台简单加法 c# 服务端框架 c# 判断事件是否注册 c#中is和has c# udp 连接超时 c#词典 c#实现排列组合 c# oss 上传 c#判断输入的是否为ip

相似问题

3
c#中如何在listview控件里逐一添加并显示数据项?即一边使用add函数添加一边在屏幕上显示
1
My97DatePicker 时间控件 显示当前时间
0
halcon中disp_message函数生成的文字,如何一同显示到picture控件里面呢?
1
Visual Studio 2015 编辑自定义控件报错:调用的目标发生了异常
1
qt对于库中frame控件的调用
1
WdatePicker时间控件偏移
3
c# panel控件中radiobutton控件都check值如何获取
3
C# 自带控件chart多条曲线显示方法(连接sql动态获取)
3
急需一个可以在网页js调用的可以读取电脑磁盘图片转base64编码数据字符串返回的ocx控件?
1
MFC界面上加地图,程序中输入经纬度要在地图上显示位置,要求离线,有好的解决方法吗?
1
MFC 给下拉框添加控件变量后显示未将对象引用设置到对象实例
2
在C#中用主窗口的控件控制子窗口的控件,子窗口(Win1)访问主窗口(Form1)的控件
1
C# 请问如何给用代码实例出的控件写事件?谢谢老板!
4
VC++ MFC的CDC控件如何用按钮滚动显示内容
3
一个控件的属性ID,与另一个控件的属性Name重复了。使用document.getElementById(“xxx”)会获取到哪个控件呢?
1
.NET 使用flexGrid控件时如何将鼠标焦点聚焦在某一单元格上边
1
如何将Qt界面嵌入html网页中显示?
2
winform Label控件不显示
0
急!MFC如何只显示子窗口的一部分
1
MFC edit control控件循环显示问题