echarts 地图修改
This commit is contained in:
parent
0155d8bc23
commit
0c3af55fb3
|
|
@ -20,7 +20,7 @@
|
||||||
<script src="../../js/home/userBanding.js" type="text/javascript"></script>
|
<script src="../../js/home/userBanding.js" type="text/javascript"></script>
|
||||||
<script src="../../js/public/openIframe.js" type="text/javascript"></script>
|
<script src="../../js/public/openIframe.js" type="text/javascript"></script>
|
||||||
|
|
||||||
<title>安全质量智慧决策中心</title>
|
<title>主动安全值班助手</title>
|
||||||
<style>
|
<style>
|
||||||
/*input框,select样式*/
|
/*input框,select样式*/
|
||||||
.layui-select {
|
.layui-select {
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
||||||
//在div中初始化地图
|
//在div中初始化地图
|
||||||
let uploadedDataURL2 = "../../../js/compreDisplay/anhui/hefei.json";
|
let uploadedDataURL2 = "../../../js/compreDisplay/anhui/jilin.json";
|
||||||
echarts.init(document.getElementById('echarts-map')).dispose();
|
echarts.init(document.getElementById('echarts-map')).dispose();
|
||||||
let myChart2 = null;
|
let myChart2 = null;
|
||||||
|
|
||||||
|
|
@ -194,8 +194,9 @@ function isOnline(value) {
|
||||||
|
|
||||||
// 地市地图
|
// 地市地图
|
||||||
function setCityMap(name, isSup, mapPointList) {
|
function setCityMap(name, isSup, mapPointList) {
|
||||||
if (isSup === '1' || isSup === '2') {
|
uploadedDataURL2 = '../../js/compreDisplay/anhui/jilin.json';
|
||||||
uploadedDataURL2 = '../../js/compreDisplay/anhui/anhui.json';
|
/* if (isSup === '1' || isSup === '2') {
|
||||||
|
uploadedDataURL2 = '../../js/compreDisplay/anhui/jinli.json';
|
||||||
} else {
|
} else {
|
||||||
if (name === "12A0") {
|
if (name === "12A0") {
|
||||||
uploadedDataURL2 = '../../js/compreDisplay/anhui/hefei.json';
|
uploadedDataURL2 = '../../js/compreDisplay/anhui/hefei.json';
|
||||||
|
|
@ -232,7 +233,7 @@ function setCityMap(name, isSup, mapPointList) {
|
||||||
} else if (name === "12Z0") {
|
} else if (name === "12Z0") {
|
||||||
uploadedDataURL2 = '../../js/compreDisplay/anhui/anhui.json';
|
uploadedDataURL2 = '../../js/compreDisplay/anhui/anhui.json';
|
||||||
}
|
}
|
||||||
}
|
} */
|
||||||
myChart2 = echarts.init(document.getElementById('echarts-map'));
|
myChart2 = echarts.init(document.getElementById('echarts-map'));
|
||||||
map2(mapPointList);
|
map2(mapPointList);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
//在div中初始化地图
|
//在div中初始化地图
|
||||||
// /let myChart = echarts.init(document.getElementById('map-content'));
|
// /let myChart = echarts.init(document.getElementById('map-content'));
|
||||||
let uploadedDataURL = "../../js/compreDisplay/anhui/anhui.json";
|
// let uploadedDataURL = "../../js/compreDisplay/anhui/anhui.json";
|
||||||
|
let uploadedDataURL = "../../js/compreDisplay/anhui/jilin.json";
|
||||||
let myChart = echarts.init(document.getElementById('echarts-map'));
|
let myChart = echarts.init(document.getElementById('echarts-map'));
|
||||||
// 选中的地市名称和编码
|
// 选中的地市名称和编码
|
||||||
let clickCityName = null, clickCityCode = null;
|
let clickCityName = null, clickCityCode = null;
|
||||||
|
|
@ -336,7 +337,7 @@ function map(dataMap) {
|
||||||
/*myChart.off('click').on('click', function (params) {
|
/*myChart.off('click').on('click', function (params) {
|
||||||
// openVideo(params.data)
|
// openVideo(params.data)
|
||||||
});*/
|
});*/
|
||||||
myChart.off('dblclick').on("dblclick", function (params) {
|
/* myChart.off('dblclick').on("dblclick", function (params) {
|
||||||
if(params.componentType === 'geo'){
|
if(params.componentType === 'geo'){
|
||||||
$('.switch-type').css('display', 'none');
|
$('.switch-type').css('display', 'none');
|
||||||
$('.switch-btn').css('display', 'none');
|
$('.switch-btn').css('display', 'none');
|
||||||
|
|
@ -345,7 +346,7 @@ function map(dataMap) {
|
||||||
console.log(params);
|
console.log(params);
|
||||||
setUploadedDataURL2(params.name);
|
setUploadedDataURL2(params.name);
|
||||||
}
|
}
|
||||||
})
|
}) */
|
||||||
});
|
});
|
||||||
window.addEventListener("resize", function () {
|
window.addEventListener("resize", function () {
|
||||||
myChart.resize();
|
myChart.resize();
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ function createMap() {
|
||||||
terrainMap = new BMap.Map("allMap", {
|
terrainMap = new BMap.Map("allMap", {
|
||||||
mapType: BMAP_HYBRID_MAP
|
mapType: BMAP_HYBRID_MAP
|
||||||
}); // 创建Map实例
|
}); // 创建Map实例
|
||||||
terrainMap.centerAndZoom('合肥', 8); // 初始化地图,设置中心点坐标和地图级别
|
terrainMap.centerAndZoom('吉林', 8); // 初始化地图,设置中心点坐标和地图级别
|
||||||
//添加地图类型控件
|
//添加地图类型控件
|
||||||
// terrainMap.addControl(new BMap.MapTypeControl({
|
// terrainMap.addControl(new BMap.MapTypeControl({
|
||||||
// mapTypes: [
|
// mapTypes: [
|
||||||
|
|
@ -113,7 +113,7 @@ function createMap() {
|
||||||
// BMAP_HYBRID_MAP
|
// BMAP_HYBRID_MAP
|
||||||
// ]
|
// ]
|
||||||
// }));
|
// }));
|
||||||
terrainMap.setCurrentCity("合肥"); // 设置地图显示的城市 此项是必须设置的
|
terrainMap.setCurrentCity("吉林"); // 设置地图显示的城市 此项是必须设置的
|
||||||
|
|
||||||
}
|
}
|
||||||
// 创建地图
|
// 创建地图
|
||||||
|
|
@ -121,7 +121,7 @@ function createMap2() {
|
||||||
terrainMap = new BMap.Map("allMap", {
|
terrainMap = new BMap.Map("allMap", {
|
||||||
// mapType: BMAP_HYBRID_MAP
|
// mapType: BMAP_HYBRID_MAP
|
||||||
}); // 创建Map实例
|
}); // 创建Map实例
|
||||||
terrainMap.centerAndZoom('合肥', 8); // 初始化地图,设置中心点坐标和地图级别
|
terrainMap.centerAndZoom('吉林', 8); // 初始化地图,设置中心点坐标和地图级别
|
||||||
//添加地图类型控件
|
//添加地图类型控件
|
||||||
// terrainMap.addControl(new BMap.MapTypeControl({
|
// terrainMap.addControl(new BMap.MapTypeControl({
|
||||||
// mapTypes: [
|
// mapTypes: [
|
||||||
|
|
@ -129,12 +129,12 @@ function createMap2() {
|
||||||
// BMAP_HYBRID_MAP
|
// BMAP_HYBRID_MAP
|
||||||
// ]
|
// ]
|
||||||
// }));
|
// }));
|
||||||
// terrainMap.setCurrentCity("合肥"); // 设置地图显示的城市 此项是必须设置的
|
// terrainMap.setCurrentCity("吉林"); // 设置地图显示的城市 此项是必须设置的
|
||||||
|
|
||||||
}
|
}
|
||||||
//设置区域图 start
|
//设置区域图 start
|
||||||
function madeBoundary() {
|
function madeBoundary() {
|
||||||
let datas = new Array("安徽省-");
|
let datas = new Array("吉林省-");
|
||||||
var bdary = new BMap.Boundary();
|
var bdary = new BMap.Boundary();
|
||||||
for (var i = 0; i < datas.length; i++) {
|
for (var i = 0; i < datas.length; i++) {
|
||||||
getBoundary(datas[i], bdary);
|
getBoundary(datas[i], bdary);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<title>安全质量智慧决策中心</title>
|
<title>主动安全值班助手</title>
|
||||||
</head>
|
</head>
|
||||||
<link href="bns/css/login.css" rel="stylesheet">
|
<link href="bns/css/login.css" rel="stylesheet">
|
||||||
<link href="bns/js/layui/css/layui.css" rel="stylesheet">
|
<link href="bns/js/layui/css/layui.css" rel="stylesheet">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue