赞
踩
//注册
$.getJSON("js/mapJson/china.json", function (data) {
echarts.registerMap('china', data);
})
//使用
geo: {
map: "china",
}
使用百度地图作为底图
import "../../../static/js/bmap.min";
let option = { tooltip: { //触发类型 数据项图形触发,主要在散点图,饼图等无类目轴的图表中使用。 trigger: "item" }, //地图配置 bmap: { center: [121.47, 31.23], zoom: 6, roam: true, mapStyle: { styleJson: [ { featureType: "water", elementType: "all", stylers: { color: "#044161" } }, { featureType: "land", elementType: "all", stylers: { color: "#004981" } }, { featureType: "boundary", elementType: "geometry", stylers: { color: "#064f85" } }, { featureType: "railway", elementType: "all", stylers: { visibility: "off" } }, { featureType: "highway", elementType: "geometry", stylers: { color: "#004981" } }, { featureType: "highway", elementType: "geometry.fill", stylers: { color: "#005b96", lightness: 1 } }, { featureType: "highway", elementType: "labels", stylers: { visibility: "off" } }, { featureType: "arterial", elementType: "geometry", stylers: { color: "#004981" } }, { featureType: "arterial", elementType: "geometry.fill", stylers: { color: "#00508b" } }, { featureType: "poi", elementType: "all", stylers: { visibility: "off" } }, { featureType: "green", elementType: "all", stylers: { color: "#056197", visibility: "off" } }, { featureType: "subway", elementType: "all", stylers: { visibility: "off" } }, { featureType: "manmade", elementType: "all", stylers: { visibility: "off" } }, { featureType: "local", elementType: "all", stylers: { visibility: "off" } }, { featureType: "arterial", elementType: "labels", stylers: { visibility: "off" } }, { featureType: "boundary", elementType: "geometry.fill", stylers: { color: "#029fd4" } }, { featureType: "building", elementType: "all", stylers: { color: "#1a5787" } }, { featureType: "label", elementType: "all", stylers: { visibility: "off" } } ] } }, series: series };
//series
coordinateSystem: "bmap",
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。