suyiScreen/public/land/landMap.html

1491 lines
70 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<title>思极地图</title>
<style>
html,
body {
padding: 0;
margin: 0;
width: 100%;
height: 100%;
}
.fc {
width: 31px;
height: 36px;
display: none;
z-index: 100;
background-image: url(images/fc.png);
position: relative;
z-index: 9999;
}
.fc:hover {
background-image: url(images/fc-hot.png);
}
.yzfc {
width: 31px;
height: 36px;
display: none;
z-index: 100;
background-image: url(images/fc.png);
position: relative;
z-index: 9999;
}
.yzfc:hover {
background-image: url(images/fc-hot.png);
}
.tzfc {
width: 31px;
height: 36px;
display: none;
z-index: 100;
background-image: url(images/fc.png);
position: relative;
z-index: 9999;
}
.tzfc:hover {
background-image: url(images/fc-hot.png);
}
.sqfc {
width: 31px;
height: 36px;
display: none;
z-index: 100;
background-image: url(images/fc.png);
position: relative;
z-index: 9999;
}
.sqfc:hover {
background-image: url(images/fc-hot.png);
}
.wxfc {
width: 31px;
height: 36px;
display: none;
z-index: 100;
background-image: url(images/fc.png);
position: relative;
z-index: 9999;
}
.wxfc:hover {
background-image: url(images/fc-hot.png);
}
.szfc {
width: 31px;
height: 36px;
display: none;
z-index: 100;
background-image: url(images/fc.png);
position: relative;
z-index: 9999;
}
.szfc:hover {
background-image: url(images/fc-hot.png);
}
.czfc {
width: 31px;
height: 36px;
display: none;
z-index: 100;
background-image: url(images/fc.png);
position: relative;
z-index: 9999;
}
.czfc:hover {
background-image: url(images/fc-hot.png);
}
.ntfc {
width: 31px;
height: 36px;
display: none;
z-index: 100;
background-image: url(images/fc.png);
position: relative;
z-index: 9999;
}
.ntfc:hover {
background-image: url(images/fc-hot.png);
}
.lygfc {
width: 31px;
height: 36px;
display: none;
z-index: 100;
background-image: url(images/fc.png);
position: relative;
z-index: 9999;
}
.lygfc:hover {
background-image: url(images/fc-hot.png);
}
.hafc {
width: 31px;
height: 36px;
display: none;
z-index: 100;
background-image: url(images/fc.png);
position: relative;
z-index: 9999;
}
.hafc:hover {
background-image: url(images/fc-hot.png);
}
.ycfc {
width: 31px;
height: 36px;
display: none;
z-index: 100;
background-image: url(images/fc.png);
position: relative;
z-index: 9999;
}
.ycfc:hover {
background-image: url(images/fc-hot.png);
}
.xzfc {
width: 31px;
height: 36px;
display: none;
z-index: 100;
background-image: url(images/fc.png);
position: relative;
z-index: 9999;
}
.xzfc:hover {
background-image: url(images/fc-hot.png);
}
.zjfc {
width: 31px;
height: 36px;
display: none;
z-index: 100;
background-image: url(images/fc.png);
position: relative;
z-index: 9999;
}
.zjfc:hover {
background-image: url(images/fc-hot.png);
}
/* 土地样式 */
.td {
width: 31px;
height: 36px;
display: none;
z-index: 100;
background-image: url(images/camera.png);
position: relative;
z-index: 9999;
}
.td:hover {
background-image: url(images/camera.png);
}
.model {
width: 60px;
height: 60px;
background-image: url(images/model.png);
position: relative;
z-index: 9999;
}
.model:hover {
background-image: url(images/model.png);
}
.jd {
width: 31px;
height: 36px;
display: none;
z-index: 100;
background-image: url(images/td1.png);
position: relative;
z-index: 9999;
}
.jd:hover {
background-image: url(images/td-hot1.png);
}
.wnd {
width: 400px;
height: 268px;
margin-left: -80px;
margin-top: 40px;
display: none;
background: url('images/wind.png') no-repeat;
background-size: 100% 100%;
position: fixed;
z-index: 655361111;
}
.txt {
display: none;
width: 100%;
height: 35px;
margin-left: 0px;
margin-top: 10px;
text-align: center;
float: left;
color: white;
font-size: 12px;
font-weight: bold;
line-height: 35px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
}
.pos {
display: none;
width: 100%;
height: 20px;
margin-left: 0px;
margin-top: 0px;
text-align: center;
float: left;
color: white;
font-size: 12px;
line-height: 20px;
}
.labelBox {
display: inline-block;
width: 140px;
height: 45px;
/* padding-left: 20px; */
text-align: center;
line-height: 45px;
background: url(images/bottomM.png) no-repeat;
;
background-size: 100% 100%;
color: #b4e9ff;
/* font-weight: 700; */
font-size: 16px;
}
.labelBox:hover {
background: url(images/bottomX.png) no-repeat;
color: #00fcff;
text-shadow: 0 0 5px #00fcff,
0 0 10px #00fcff,
0 0 15px #00fcff,
0 0 20px #00fcff;
}
.labelBox:active {
background: url(images/bottomX.png) no-repeat;
color: #00fcff;
text-shadow: 0 0 5px #00fcff,
0 0 10px #00fcff,
0 0 15px #00fcff,
0 0 20px #00fcff;
}
/* .label{
color: #000;
font-weight: 700;
} */
/* 搜索框 */
.search-middle {
position: absolute;
left: 50%;
top: 180px;
width: 356px;
height: 42px;
transform: translateX(-50%);
}
.search-middle .search-container {
position: relative;
width: 100%;
height: 100%;
}
.search-middle .search-container input {
width: 100%;
height: 100%;
padding-left: 15px;
background-color: transparent;
background-image: url(images/search-input.png);
background-size: contain;
border: 0;
border-radius: 0;
font-size: 12px;
color: rgb(211, 245, 255);
}
.search-middle .search-container input:focus {
outline: none;
}
.search-middle .search-container input::-webkit-input-placeholder {
color: rgb(211, 245, 255);
}
.search-middle .search-container button {
width: 45px;
height: 100%;
position: absolute;
right: 0;
top: 0;
background-color: transparent;
background: 10px 10px url(images/search-button.png) no-repeat;
border: 0;
border-radius: 0;
text-align: center;
line-height: 30px;
cursor: pointer;
}
/* 对话框demo */
.dialogs-demo>div {
position: absolute;
width: 343px;
height: 166px;
background-image: url(images/dialog.png);
cursor: pointer;
}
.dialogs-demo>div:hover {
background-image: url(images/dialog-highlight.png);
}
.dialogs-demo>div img {
position: relative;
left: 215px;
top: -65px;
}
.dialogs-demo>div .text {
position: relative;
left: 38px;
top: -130px;
}
.dialogs-demo>div .text p:first-child {
font-weight: 700;
font-size: 16px;
color: rgb(132, 222, 231);
line-height: 45px;
}
.dialogs-demo>div .text p:last-child {
font-weight: 400;
font-size: 16px;
color: #fff;
}
.dialogs-demo>div.demo-1 {
left: 900px;
top: 312px;
}
.dialogs-demo>div.demo-2 {
left: 1100px;
top: 520px;
}
.dialogs-demo>div.demo-3 {
left: 723px;
top: 650px;
}
</style>
</head>
<body>
<div id="map" style="width: 100%; height: 100%;"></div>
<!-- <div style="position:absolute;bottom: 8rem;
right: 52rem;">
<div id="labelBox2" class="labelBox" style="color:#00fcff" onclick="show('jd','2')">
生产辅助用房
</div>
&nbsp;&nbsp;
<div id="labelBox3" class="labelBox" onclick="show('bdz','3')">
生产用房
</div>
</div> -->
<script src="https://map.sgcc.com.cn/maps?v=3.0.0"></script>
<!-- <script src="js/maps.js"></script> -->
<script src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/socket.io.js"></script>
<!-- <script type="text/javascript" charset="utf-8">
</script> -->
<script id="mapScript">
const params = new URLSearchParams(window.location.search.split('?')[1]);
console.log(params.get('cityName'), params.get('src').split(',')[1], '传值');
// var btn1Obj = document.getElementById("labelBox1");
//object.attachEvent(event,function);
// btn1Obj.addEventListener("onclick",method1);
$("#labelBox1").on("click", function (e) {
$("#labelBox1").css("color", "#00fcff")
$("#labelBox1").css("font-weight", "700")
$("#labelBox1").css("text-shadow", "0 0 5px #00fcff,0 0 10px #00fcff,0 0 15px #00fcff,0 0 20px #00fcff ; ")
$("#labelBox2").css("color", "#b4e9ff")
$("#labelBox3").css("color", "#b4e9ff")
});
$("#labelBox2").on("click", function (e) {
$("#labelBox2").css("color", "#00fcff")
$("#labelBox2").css("font-weight", "700")
$("#labelBox2").css("text-shadow", "0 0 5px #00fcff,0 0 10px #00fcff,0 0 15px #00fcff,0 0 20px #00fcff ; ")
$("#labelBox1").css("color", "#b4e9ff")
$("#labelBox3").css("color", "#b4e9ff")
});
$("#labelBox3").on("click", function (e) {
$("#labelBox3").css("color", "#00fcff")
$("#labelBox3").css("font-weight", "700")
$("#labelBox3").css("text-shadow", "0 0 5px #00fcff,0 0 10px #00fcff,0 0 15px #00fcff,0 0 20px #00fcff ; ")
$("#labelBox1").css("color", "#b4e9ff")
$("#labelBox2").css("color", "#b4e9ff")
});
function method1(i, index) {
console.log("i", i)
console.log("index", index)
}
var map = null;
// var defaultLevel = 7.5;//默认层级
// var defaultArea = "nj";
var defaultLevel = 16;//默认层级
var defaultArea = "njData";
var defaultPos = "nanjing";//默认画线的位置
var cityBoundsData = new Object();
var cityOverColor = "#ff002a";//城市鼠标经过颜色
//socket
// var socket = io('wss://111.229.30.246:18443');
// var socket = io('ws://111.229.30.246:18444');
//本地socket id
// var socketId = "dtfdzy";// new Date().getTime().toString();//改为自己的固定ID
//document.title = socketId;
document.getElementById("map").oncontextmenu = function (e) {
return false;
}
document.getElementById("map").onmousedown = function (e) {
if (e.button == 2) {
parent.show()
}
}
//注册
// socket.emit('register', socketId);
// //接收
// socket.on('receive', function (message) {
// switch (message) {
// case "0":
// console.log("注册成功!");
// break;
// default:
// console.log("其它消息:" + message);
// break;
// }
// });
// function send(val) {
// console.log("val",val)
// // var targetId = $("txtTarget").value;//目标页面socketId
// // var message = $("txtMessage").value;//发给目标页面的消息内容
// socket.emit('sendto', { target: 'fdzy', data: val });
// }
// function $(id) {
// return document.getElementById(id);
// }
var positions = {
"nj": { name: "南京市", lng: params.get('src').split(',')[0], lat: params.get('src').split(',')[1] },
"njData": { name: "南京市", lng: params.get('src').split(',')[0], lat: params.get('src').split(',')[1] },
}
var layers = {}
var clickShow = false
var mapType = {
stardand: "aegis://styles/aegis/Streets",//标准
formated: "aegis://styles/aegis/Streets-Raster512",//栅格
pictures: "aegis://styles/aegis/Satellite512"//卫星
}
var njfc = []
var rightMap = ''
var nameJD = ''
function getMessageFromParent(val) {
console.log("val", val)
$(".fc").hide();
$(".td").hide();
$(".wnd").hide();
$(".model").hide();
nameJD = val
if (nameJD != '') {
loadJDdw(nameJD)
} else {
loadFC();
}
}
// 申请的key和sn
SGMap.tokenTask
.login("1a6fc765e72b36819428016bed30ff48", "5916636e73f03e5dbdf275f810fc7d62")
.then(function () {
initMap();
});
function initMap() {
var area = GetQueryString("area");
var lng = positions[defaultArea].lng;
var lat = positions[defaultArea].lat;
if (area != null) {
defaultArea = area;
lng = positions[defaultArea].lng;
lat = positions[defaultArea].lat;
}
map = new SGMap.Map({
// 地图绑定的DOM元素ID
container: "map",
// 地图样式
style: mapType.stardand,
// 默认缩放层级
zoom: defaultLevel,
// 地图中心点
center: [params.get('src').split(',')[0], params.get('src').split(',')[1]],
//倾斜角度
pitch: 0,
// 地图默认字体
localIdeographFontFamily: "Microsoft YoHei"
});
loadFC();
loadTD();
MapFill();
window.setTimeout(() => {
// loadMarkers(defaultArea);
}, 500)
//reportLocation();
// 监听地图点击事件
map.on('click', function (e) {
// 获取点击位置的经纬度
console.log('e', e.lngLat.lng + ',', e.lngLat.lat);
});
};
function initMap1() {
var area = GetQueryString("area");
// console.log("defaultArea",defaultArea)
defaultArea = "njData"
// loadMarkers(defaultArea);
};
function MapFill() {
SGMap.plugin(['SGMap.DistrictTask']).then(function (res) {
var districtTask = new SGMap.DistrictTask()
districtTask
.searchDistrict({
// keyword: '南京市',
keyword: '江苏省', // 必填项,检索关键字,或者是行政区划编码
subdistrict: 2, // 选填项设置显示下级行政区级数0不返回下级行政区 1返回下一级行政区 2返回下两级行政区 3返回下三级行政区
extension: true, // 是否返回行政区边界坐标点
})
.then(function (result) {
$.get("data/map/js.json", function (res) {
layers.jiangsu = new Object();
layers.jiangsu.line = createLine("jiangsu", res.jiangsu, '#3787ff', 2).id;
layers.jiangsu.polygon = createPolygon("jiangsu", res.jiangsu, '#3787ff', 0.1).id;
if (params.get('cityName') == '南通市') {
createCities("nantong", res.nantong);
} else if (params.get('cityName') == '泰州市') {
createCities("taizhou", res.taizhou);
} else if (params.get('cityName') == '无锡市') {
createCities("wuxi", res.wuxi);
} else if (params.get('cityName') == '宿迁市') {
createCities("suqian", res.suqian);
} else if (params.get('cityName') == '连云港市') {
createCities("lianyungang", res.lianyungang);
} else if (params.get('cityName') == '徐州市') {
createCities("xuzhou", res.xuzhou);
} else if (params.get('cityName') == '南京市') {
createCities("nanjing", res.nanjing);
}
// createCities("zhenjiang",res.zhenjiang);
// createCities("suzhou",res.suzhou);
// createCities("changzhou",res.changzhou);
// createCities("yangzhou",res.yangzhou);
// createCities("yancheng",res.yancheng);
// createCities("huaian",res.huaian);
});
});
});
}
//画线
function createLine(name, data, color, lineWidth) {
var id = "l-" + name;
clearLayer(id);
var line = map.addLayer({
"id": id,
'type': 'line',
'source': {
'type': 'geojson',
'data': {
'type': 'FeatureCollection',
'features': [{
'type': 'Feature',
'geometry': {
'type': 'LineString',
'coordinates': data
}
}]
}
}, 'paint': {
'line-color': color,
'line-width': lineWidth
}
});
line.id = id;
return line;
}
//填充
function createPolygon(name, data, color, opacity) {
var id = "p-" + name;
clearLayer(id);
var polygon = map.addLayer({
"id": id,
'type': 'fill',
'source': {
'type': 'geojson',
'data': {
'type': 'FeatureCollection',
'features': [{
'type': 'Feature',
'geometry': {
'type': 'Polygon',
'coordinates': [data]
}
}]
}
},
'paint': {
'fill-color': color, // 默认值为黑色#000
'fill-opacity': opacity
}
});
polygon.id = id;
return polygon;
}
function createCities(cityName, cityData) {
visibleTD()
// visibleFC()
var hidePolygon = createPolygon("hide" + cityName, cityData, "#000000", 0);
createPolygon("show" + cityName, cityData, cityOverColor, 0.1);
createLine("show" + cityName, cityData, cityOverColor, 1);
// map.on('mouseover', hidePolygon.id, function (ev) {
// createPolygon("show" + cityName, cityData, cityOverColor, 0.1);
// createLine("show" + cityName, cityData, cityOverColor, 1);
// });
// map.on('mouseleave', hidePolygon.id, function (ev) {
// clearLayer("p-show" + cityName);
// clearLayer("l-show" + cityName);
// });
// map.on('click', hidePolygon.id, function (ev) {
// console.log("1111",cityData[0],cityName)
// map.easeTo({ center: [cityData[100][0], cityData[100][1]], zoom: getMapZoom1() });
// });
}
//清楚层
function clearLayer(layerId) {
if (map.getLayer(layerId) != undefined) {
map.removeLayer(layerId);
map.removeSource(layerId);
}
}
//获取地图层级
function getMapZoom() {
// console.log("getZoom",map.getZoom())
return map.getZoom() + 2;
}
//获取地图层级
function getMapZoom1() {
// console.log("getZoom",map.getZoom())
// return map.getZoom();
return 10;
}
//设置地图层级
function setMapZoom(n) {
if (!isNaN(n) && n >= 0 && n <= 20)
map.setZoom(n);
}
//设置地图中心
function setMapCenter(lat, lng) {
map.setCenter([lat, lng]);
}
//获取地图当前中心点坐标
function getMapCenter() {
return map.getCenter();
}
//每秒汇报当前中心点坐标
function reportLocation() {
var centerPoint = getMapCenter();
console.log(centerPoint);
window.setTimeout("reportLocation()", 1000);
}
//地点跳转
function gotoPosition(posName) {
map.easeTo({ center: [positions[posName].lng, positions[posName].lat], zoom: getMapZoom() });
// loadMarkers(posName);
clearLayer("l-" + defaultPos);//移除上一层区域
clearLayer("p-" + defaultPos);//移除上一层区域
defaultPos = posName;//设置为当前区域
createLine(posName, positions[posName].data, '#00d91f', 2);//为当前区域画线
createPolygon(posName, positions[posName].data, '#00d91f', 0.2);//为当前区域填充
}
//画marker点
function addMarker(markerData) {
var el = document.createElement("img");
el.cusData = markerData;
el.className = "marker";
// 自定义图标
el.src = markerData.icon;
el.style.width = markerData.width == undefined ? "64px" : markerData.width + "px";
el.style.height = markerData.height == undefined ? "64px" : markerData.height + "px";
// 如果不传el会默认给一个蓝色水滴图标
var mk = new SGMap.Marker(el, {
// marker相对经纬度点坐标点的位置
anchor: "bottom",
// 相对于元素中心点,偏移的像素距离,负数代表向左和向上
offset: [markerData.xOffset == undefined ? 0 : markerData.xOffset, markerData.yOffset == undefined ? 0 : markerData.yOffset]
});
mk.setLngLat([markerData.lng, markerData.lat]);
mk.addTo(map);
el.addEventListener("click", function (e) {
/////////////////////////////////自定义输出内容//////////////////////////////////////
console.log("场景跳转@" + e.target.cusData.data);
});
return mk;
}
//加载图标
// var markerArray = new Array();
// function loadMarkers(posName) {
// console.log(posName, 'posName');
// for (var i in markerArray) {
// markerArray[i].remove();
// }
// markerArray = new Array();
// var markers = positions[posName];
// console.log(markers, 'markers');
// if (markers != undefined && markers != null) {
// for (var i in markers) {
// var markerData = markers[i];
// markerArray.push(addMarker(markerData));
// }
// }
// }
function loadFC() {
$.get("data/jd.json", function (res) {
res = [
{ "tudi": "model", "jd": "", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "", "position": params.get('src').split(',')[0] + ',' + params.get('src').split(',')[1] }
]
for (var i in res) {
var row = res[i];
var lng = parseFloat(row.position.substring(0, row.position.indexOf(',')));
var lat = parseFloat(row.position.substr(row.position.indexOf(',') + 1));
// console.log(lng, lat);
if (lng != NaN && lat != NaN && lng > 100 && lat < 100) {
//画marker点
var el = document.createElement("div");
el.className = "marker";
el.cusData = row;
el.lng = lng;
el.lat = lat;
el.setAttribute("class", "model");
var tip = document.createElement("div");
// tip.setAttribute("class", "wnd");
el.appendChild(tip);
el.tip = tip;
var txt = document.createElement("div");
txt.innerText = "龙园西路113号枫亚湾5幢701";
txt.setAttribute("class", "txt");
tip.appendChild(txt);
tip.txt = txt;
var pos = document.createElement("div");
pos.innerText = "江苏省南京市";
pos.setAttribute("class", "pos");
tip.appendChild(pos);
tip.pos = pos;
// var sideBar = document.getElementsByClassName('td');
// if (el.className.includes('act')) {
// console.log("act")
// }else{
// $(el.tip).hide();
// }
// $(el.tip).hide();
el.addEventListener("mouseover", function (e) {
$(e.target.tip).show();
$(e.target.tip.txt).html(e.target.cusData.tudi);
$(e.target.tip.pos).html(e.target.cusData.jd);
});
el.addEventListener("mouseleave", function (e) {
if (e.target.className.includes('act')) {
} else {
$(e.target.tip).hide();
}
});
el.addEventListener("click", function (e) {
console.log("e", e.target.cusData.jd)
window.parent.bigModel()
// parent.getFromIframe({ data:"办公用地",params:e.target.cusData.jd,type:e.target.cusData.type})
// siblingsRomoveClassAct(e.target, 'act',e.target.cusData)
// e.target.className += ' act';
// window.parent.postMessage({ data: "变电站", params: e.target.cusData.jd, type: e.target.cusData.type }, '*');
}, true);
// 如果不传el会默认给一个蓝色水滴图标
var mk = new SGMap.Marker(el, {
// marker相对经纬度点坐标点的位置
anchor: "bottom",
// 相对于元素中心点,偏移的像素距离,负数代表向左和向上
offset: [-15.5, -18]
});
mk.setLngLat([lng, lat]);
mk.addTo(map);
}
}
});
}
//基地数据
function loadTD() {
$.get("data/jd.json", function (res) {
if (params.get('stationName') == 'WXXL') { //无锡雪浪
res = [
{ "tudi": "WXXL", "jd": "c1", "position": "120.295,31.4455", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": "WXXL", "jd": "c2", "position": "120.29407732009997,31.445179638689", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": "WXXL", "jd": "c3", "position": "120.293755455,31.444374153", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": "WXXL", "jd": "c4", "position": "120.29409877,31.443953", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": "WXXL", "jd": "c5", "position": "120.29589049337454,31.443921065796758", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": "WXXL", "jd": "c6", "position": "120.29480688095146,31.443623582456127", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" }
]
} else if (params.get('stationName') == 'WXSFJC10') { //无锡硕放机场10
res = [
{ "tudi": params.get('stationName'), "jd": "c1", "position": "120.4333234627585,31.50836675133587", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c2", "position": "120.43463238075833,31.508156369688876", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c3", "position": "120.43536194160981,31.508430780438786", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c4", "position": "120.43581255272562,31.50902533430050", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c5", "position": "120.43513663605364,31.509857703352736", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c6", "position": "120.43388136223479,31.510058934318423", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c7", "position": "120.43309815720227,31.50949182775892", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
]
} else if (params.get('stationName') == 'WXSFJC20') {//无锡硕放机场20
res = [
{ "tudi": params.get('stationName'), "jd": "c1", "position": "120.4333234627585,31.50836675133587", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c2", "position": "120.43463238075833,31.508156369688876", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c3", "position": "120.43536194160981,31.508430780438786", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c4", "position": "120.43581255272562,31.50902533430050", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c5", "position": "120.43513663605364,31.509857703352736", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c6", "position": "120.43388136223479,31.510058934318423", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
]
} else if (params.get('stationName') == 'WXRMYYD') {//无锡人民医院D
res = [
{ "tudi": params.get('stationName'), "jd": "c1", "position": "120.32586051570166,31.53976959726087", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c2", "position": "120.32497002231031,31.53927582301688", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c3", "position": "120.32476617442455,31.53856258894365", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c4", "position": "120.32535626040817,31.537831061156112", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c5", "position": "120.32654716121061,31.537785340479132", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c6", "position": "120.32715870486635,31.538425427919492", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c7", "position": "120.3269119416363,31.53927582301688", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
]
} else if (params.get('stationName') == 'TZJYJCDS') {//泰州姜堰璟宸大厦
res = [
{ "tudi": params.get('stationName'), "jd": "c1", "position": "120.13295644577403,32.50807193798575", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c2", "position": "120.13302081879033, 32.50731191988096", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c3", "position": "120.13391131218339, 32.507022387484724", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c4", "position": "120.1351773148391, 32.50757430780965", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c5", "position": "120.1350056534605, 32.508415753588906", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c6", "position": "120.1343726521344, 32.508632899609", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c7", "position": "120.13338559921607, 32.5085333744145", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
]
} else if (params.get('stationName') == 'NJMRJD') {//南京名人酒店
res = [
{ "tudi": params.get('stationName'), "jd": "c1", "position": "118.78503295402481, 32.06072873452416", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c2", "position": "118.78318507277027, 32.05979077371725", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c3", "position": "118.78374297224661, 32.059490716400816", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c4", "position": "118.78312069975397, 32.06012720044785", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c5", "position": "118.78513992472944, 32.05967326983182", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c6", "position": "118.78438890620589, 32.06084621322357", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c7", "position": "118.78346622630386, 32.06065526997551", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
]
}else if (params.get('stationName') == 'LYGGYQYSC') {//连云港赣榆青源水务
res = [
{ "tudi": params.get('stationName'), "jd": "c1", "position": "119.13950306588185, 34.84588008407768", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c2", "position": "119.13878423386558, 34.845325362841834", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c3", "position": "119.13891297989818, 34.844559313083764", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c4", "position": "119.14005023651953, 34.84415427239931", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c5", "position": "119.14097291642162, 34.8445240922338", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c6", "position": "119.14125186615888, 34.845228506369736", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c7", "position": "119.14067250901218, 34.84580083841584", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
]
}else if (params.get('stationName') == 'NJGAJ') {//南京公安局
res = [
{ "tudi": params.get('stationName'), "jd": "c1", "position": "118.78465085708098, 32.034161843850015", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c2", "position": "118.78420024596511, 32.033643417263406", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c3", "position": "118.78435044966983, 32.03297036784271", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c4", "position": "118.78539114676761, 32.032579269285776", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c5", "position": "118.78626018248855, 32.03294308195112", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c6", "position": "118.78638892852115, 32.03366160771962", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c7", "position": "118.78572374068602, 32.03405270165406", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
]
}else if (params.get('stationName') == 'NTZLYY') {//南通肿瘤医院
res = [
{ "tudi": params.get('stationName'), "jd": "c1", "position": "120.75168886375468, 32.10145871382298", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c2", "position": "120.75080909919859, 32.10090431442926", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c3", "position": "120.75071253967326, 32.10003181020768", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c4", "position": "120.75156011772208, 32.099413781341056", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c5", "position": "120.75270810318034, 32.09969553031401", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c6", "position": "120.75305142593572, 32.10034991167103", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c7", "position": "120.75261154365677, 32.10111335066115", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
]
}else if (params.get('stationName') == 'LYGGYGDGS') {//连云港灌云供电公司
res = [
{ "tudi": params.get('stationName'), "jd": "c1", "position": "119.24555800663813, 34.284644622054515", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c2", "position": "119.24459241139186, 34.28414819776964", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c3", "position": "119.24454949604763, 34.283465609590266", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c4", "position": "119.24525759922875, 34.282951448600215", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c5", "position": "119.24638412701489, 34.28307555671337", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c6", "position": "119.24677036511275, 34.28366063535057", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c7", "position": "119.2465236018827, 34.284263439382656", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
]
}else if (params.get('stationName') == 'NJJCY') {//南京检察院
res = [
{ "tudi": params.get('stationName'), "jd": "c1", "position": "118.78062333123438, 32.035910260976266", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c2", "position": "118.77972210900617, 32.035346369000436", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c3", "position": "118.77992595689199, 32.03460966618735", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c4", "position": "118.78092373864558, 32.03420947945929", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c5", "position": "118.781835689709, 32.03463695158234", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c6", "position": "118.78182496087379, 32.03525541835663", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c7", "position": "118.78152455346441, 32.035810215879266", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
]
}else if (params.get('stationName') == 'NTTZJY') {//南京检察院
res = [
{ "tudi": params.get('stationName'), "jd": "c1", "position": "121.06953866004602, 32.0712864546373", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c2", "position": "121.06890565871987, 32.07083187909437", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c3", "position": "121.0690022182435, 32.07003182065077", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c4", "position": "121.06966740611438, 32.06953178057941", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c5", "position": "121.07099778175063, 32.06997727095657", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c6", "position": "121.07079393386482, 32.07062277358612", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c7", "position": "121.07038623809484, 32.07124099718476", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
]
}else if (params.get('stationName') == 'XZJLH1') {//徐州金龙湖小镇1
res = [
{ "tudi": params.get('stationName'), "jd": "c1", "position": "117.28480803363283, 34.25620613214825", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c2", "position": "117.28398191325613, 34.255718407684796", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c3", "position": "117.28392826907503, 34.25507105993941", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c4", "position": "117.28445398204235, 34.25422861363421", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c5", "position": "117.28604184977951, 34.254379367803836", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c6", "position": "117.28633152835368, 34.25518634140985", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c7", "position": "117.28579508654951, 34.25601104270244", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
]
}else if (params.get('stationName') == 'XZJLH2') {//徐州金龙湖小镇1
res = [
{ "tudi": params.get('stationName'), "jd": "c1", "position": "117.28480803363283, 34.25620613214825", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c2", "position": "117.28398191325613, 34.255718407684796", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c3", "position": "117.28392826907503, 34.25507105993941", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c4", "position": "117.28445398204235, 34.25422861363421", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c5", "position": "117.28604184977951, 34.254379367803836", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c6", "position": "117.28633152835368, 34.25518634140985", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c7", "position": "117.28579508654951, 34.25601104270244", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
]
}else if (params.get('stationName') == 'LYGGYRMYY') {//连云港灌云人民医院
res = [
{ "tudi": params.get('stationName'), "jd": "c1", "position": "119.23419336541559, 34.28987820027319", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c2", "position": "119.2332706855135, 34.28926657231057", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c3", "position": "119.2333350585298, 34.28844219714301", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c4", "position": "119.233817856153, 34.28775964384093", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c5", "position": "119.23495511277605, 34.287830558727734", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c6", "position": "119.23568467362747, 34.288584025704765", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c7", "position": "119.23545936806954, 34.289514769701455", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
]
}else if (params.get('stationName') == 'TZXHRMYY') {//泰州兴化人民医院
res = [
{ "tudi": params.get('stationName'), "jd": "c1", "position": "119.84528542327615, 32.901409763296726", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c2", "position": "119.84443784522733, 32.90095035407998", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c3", "position": "119.84439492988315, 32.90025673172799", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c4", "position": "119.8451459484067, 32.8994369892183", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c5", "position": "119.84639049339029, 32.89973425935689", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c6", "position": "119.84666944312761, 32.900364829075855", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c7", "position": "119.84630466270187, 32.90127464318648", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
]
}else if (params.get('stationName') == 'NTHMRMTZX') {//南通海门融媒体中心
res = [
{ "tudi": params.get('stationName'), "jd": "c1", "position": "121.18080647354168, 31.865980222801937", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c2", "position": "121.18009837036067, 31.86537883921683", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c3", "position": "121.18027003173916, 31.864613436252085", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c4", "position": "121.18086011772107, 31.864285404464752", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c5", "position": "121.18212612037678, 31.8644494205043", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c6", "position": "121.18231923942568, 31.865151041379974", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c7", "position": "121.18195445899994, 31.865779762042408", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
]
}else if (params.get('stationName') == 'TZJYSM') {//泰州金鹰商贸
res = [
{ "tudi": params.get('stationName'), "jd": "c1", "position": "119.92394746158578, 32.49456879682458", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c2", "position": "119.92301405284849, 32.494025845888444", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c3", "position": "119.9230891547017, 32.49334715261003", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c4", "position": "119.92363632534114, 32.49269560224545", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c5", "position": "119.92519200656938, 32.492912786225105", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c6", "position": "119.925535329323, 32.49367292602305", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c7", "position": "119.9250525316998, 32.494505452717675", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
]
}else if (params.get('stationName') == 'NTQDSCLC') {//南通启东处理水厂
res = [
{ "tudi": params.get('stationName'), "jd": "c1", "position": "121.73967813492169, 31.761372896585883", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c2", "position": "121.73883055687287, 31.760880298159265", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c3", "position": "121.73887347221705, 31.759922460380537", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c4", "position": "121.73996781349598, 31.75948458838043", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c5", "position": "121.74086903572419, 31.75981299257471", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c6", "position": "121.74109434128212, 31.76046067521", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c7", "position": "121.74052571297057, 31.761163086465743", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
]
}else if (params.get('stationName') == 'LYGGNSW') {//连云港灌南水务
res = [
{ "tudi": params.get('stationName'), "jd": "c1", "position": "119.33230047635845, 34.058827130753244", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c2", "position": "119.33122759275165, 34.05811605227608", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c3", "position": "119.33139925412843, 34.05721830717877", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c4", "position": "119.33215027265373, 34.05663165673056", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c5", "position": "119.33336263112824, 34.05676498673424", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c6", "position": "119.33369522504671, 34.05746718796014", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
{ "tudi": params.get('stationName'), "jd": "c7", "position": "119.33338408880041, 34.05840937287046", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "" },
]
}
else {
res = [
// { "tudi": "", "jd": "", "type": "", "fenzhi": "", "province": "", "city": params.get('cityName'), "area": "", "position": params.get('src').split(',')[0] + ',' + params.get('src').split(',')[1] }
]
}
for (var i in res) {
var row = res[i];
var lng = parseFloat(row.position.substring(0, row.position.indexOf(',')));
var lat = parseFloat(row.position.substr(row.position.indexOf(',') + 1));
if (lng != NaN && lat != NaN && lng > 100 && lat < 100) {
//画marker点
var el = document.createElement("div");
el.className = "marker";
el.cusData = row;
el.lng = lng;
el.lat = lat;
el.setAttribute("class", "td");
var tip = document.createElement("div");
// tip.setAttribute("class", "wnd");
el.appendChild(tip);
el.tip = tip;
var txt = document.createElement("div");
txt.innerText = "龙园西路113号枫亚湾5幢701";
txt.setAttribute("class", "txt");
tip.appendChild(txt);
tip.txt = txt;
var pos = document.createElement("div");
pos.innerText = "江苏省南京市";
pos.setAttribute("class", "pos");
tip.appendChild(pos);
tip.pos = pos;
// var sideBar = document.getElementsByClassName('td');
// if (el.className.includes('act')) {
// console.log("act")
// }else{
// $(el.tip).hide();
// }
// $(el.tip).hide();
el.addEventListener("mouseover", function (e) {
$(e.target.tip).show();
$(e.target.tip.txt).html(e.target.cusData.tudi);
$(e.target.tip.pos).html(e.target.cusData.jd);
});
el.addEventListener("mouseleave", function (e) {
if (e.target.className.includes('act')) {
} else {
$(e.target.tip).hide();
}
});
el.addEventListener("click", function (e) {
console.log("e", e.target.cusData.jd, e.target.cusData.tudi)
window.parent.nonSite(e.target.cusData.jd, e.target.cusData.tudi)
// parent.getFromIframe({ data:"办公用地",params:e.target.cusData.jd,type:e.target.cusData.type})
// siblingsRomoveClassAct(e.target, 'act',e.target.cusData)
// e.target.className += ' act';
// window.parent.postMessage({ data: "变电站", params: e.target.cusData.jd, type: e.target.cusData.type }, '*');
}, true);
// 如果不传el会默认给一个蓝色水滴图标
var mk = new SGMap.Marker(el, {
// marker相对经纬度点坐标点的位置
anchor: "bottom",
// 相对于元素中心点,偏移的像素距离,负数代表向左和向上
offset: [-15.5, -18]
});
mk.setLngLat([lng, lat]);
mk.addTo(map);
}
}
});
}
function siblingsRomoveClassAct(e, className, cusData) {
var nodeList = e.parentNode.children; //父级的子节点
for (var i = 0; i < nodeList.length; i++) {
// console.log("nodeList[i]111",nodeList[i])
//判断是否元素节点 且不是本身 移除要删除的类
if (nodeList[i].nodeType == 1 && nodeList[i] != e) {
var reg = new RegExp('(\\s|^)' + className + '(\\s|$)');
nodeList[i].className = nodeList[i].className.replace(reg, ' ');
$(nodeList[i].tip).hide()
} else {
$(nodeList[i].tip).show()
$(nodeList[i].tip.txt).html(cusData.tudi);
$(nodeList[i].tip.pos).html(cusData.jd);
}
}
}
function siblingsRomoveClassActN(e, className, cusData) {
var nodeList = e.children; //父级的子节点
loadJDQK()
for (var i = 0; i < nodeList.length; i++) {
// console.log("nodeList[i]111",nodeList[i])
//判断是否元素节点 且不是本身 移除要删除的类
if (nodeList[i].nodeType == 1 && nodeList[i] != e) {
var reg = new RegExp('(\\s|^)' + className + '(\\s|$)');
nodeList[i].className = nodeList[i].className.replace(reg, ' ');
$(nodeList[i].tip).hide()
} else {
loadJDdw(val)
$(nodeList[i].tip).show()
$(nodeList[i].tip.txt).html(cusData.tudi);
$(nodeList[i].tip.pos).html(cusData.jd);
}
}
}
//基地定位
// function loadJDQK() {
// // $(".jd").hide();
// $.get("data/jd.json", function (res) {
// for (var i in res) {
// var row = res[i];
// var lng = parseFloat(row.position.substring(0, row.position.indexOf(',')));
// var lat = parseFloat(row.position.substr(row.position.indexOf(',') + 1));
// // console.log(lng, lat);
// if (lng != NaN && lat != NaN && lng > 100 && lat < 100) {
// //画marker点
// var el = document.createElement("div");
// el.className = "marker";
// el.cusData = row;
// el.lng = lng;
// el.lat = lat;
// el.setAttribute("class","jd");
// var tip = document.createElement("div");
// tip.setAttribute("class","wnd");
// el.appendChild(tip);
// el.tip = tip;
// var txt = document.createElement("div");
// txt.innerText = "龙园西路113号枫亚湾5幢701";
// txt.setAttribute("class","txt");
// tip.appendChild(txt);
// tip.txt = txt;
// var pos = document.createElement("div");
// pos.innerText = "江苏省南京市";
// pos.setAttribute("class","pos");
// tip.appendChild(pos);
// tip.pos = pos;
// // $(el.tip).show();
// // $(el.tip.txt).html(el.cusData.tudi);
// // $(el.tip.pos).html(el.cusData.jd);
// // $(el.tip).hide();
// // visiblejddis()
// $(el.tip).hide();
// el.addEventListener("on", function (e) {
// if(val== el.cusData.jd){
// $(e.target.tip).show();//(e.target.cusData.street+"("+e.target.cusData.zongdi+")");
// $(e.target.tip.txt).html(e.target.cusData.tudi);
// $(e.target.tip.pos).html(e.target.cusData.jd);
// }else{
// $(el.tip).hide();
// }
// });
// el.addEventListener("mouseover", function (e) {
// // $(e.target.tip).show();//(e.target.cusData.street+"("+e.target.cusData.zongdi+")");
// // $(e.target.tip.txt).html(e.target.cusData.tudi);
// // $(e.target.tip.pos).html(e.target.cusData.jd);
// });
// el.addEventListener("mouseleave", function (e) {
// // $(e.target.tip).hide();
// });
// el.addEventListener("click", function (e) {
// console.log("e",e.target.cusData.jd)
// // $(e.target.tip).show();
// // $(e.target.tip.txt).html(e.target.cusData.tudi);
// // $(e.target.tip.pos).html(e.target.cusData.jd);
// });
// // 如果不传el会默认给一个蓝色水滴图标
// var mk = new SGMap.Marker(el, {
// // marker相对经纬度点坐标点的位置
// anchor: "bottom",
// // 相对于元素中心点,偏移的像素距离,负数代表向左和向上
// offset: [-15.5, -18]
// });
// mk.setLngLat([lng, lat]);
// mk.addTo(map);
// }
// }
// });
// }
// function loadJDdw(val) {
// // visiblejddis()
// // console.log("val",val)
// $.get("data/jd.json", function (res) {
// for (var i in res) {
// var row = res[i];
// var lng = parseFloat(row.position.substring(0, row.position.indexOf(',')));
// var lat = parseFloat(row.position.substr(row.position.indexOf(',') + 1));
// // console.log(lng, lat);
// if (lng != NaN && lat != NaN && lng > 100 && lat < 100) {
// //画marker点
// var el = document.createElement("div");
// el.className = "marker";
// el.cusData = row;
// el.lng = lng;
// el.lat = lat;
// el.setAttribute("class","jd");
// var tip = document.createElement("div");
// tip.setAttribute("class","wnd");
// el.appendChild(tip);
// el.tip = tip;
// var txt = document.createElement("div");
// txt.innerText = "龙园西路113号枫亚湾5幢701";
// txt.setAttribute("class","txt");
// tip.appendChild(txt);
// tip.txt = txt;
// var pos = document.createElement("div");
// pos.innerText = "江苏省南京市";
// pos.setAttribute("class","pos");
// tip.appendChild(pos);
// tip.pos = pos;
// // $(el.tip).show();
// // $(el.tip.txt).html(el.cusData.tudi);
// // $(el.tip.pos).html(el.cusData.jd);
// // $(el.tip).hide();
// // $(el.tip).hide();
// visiblejd()
// if(val == el.cusData.jd){
// $(el.tip).show();
// $(el.tip.txt).html(el.cusData.tudi);
// $(el.tip.pos).html(el.cusData.jd);
// siblingsRomoveClassActN(el, 'act',el.cusData)
// }else{
// $(el.tip).hide();
// }
// el.addEventListener("mouseover", function (e) {
// $(e.target.tip).show();//(e.target.cusData.street+"("+e.target.cusData.zongdi+")");
// $(e.target.tip.txt).html(e.target.cusData.tudi);
// $(e.target.tip.pos).html(e.target.cusData.jd);
// });
// el.addEventListener("mouseleave", function (e) {
// // $(e.target.tip).hide();
// if (e.target.className.includes('act')) {
// console.log("act")
// }else{
// $(e.target.tip).hide();
// }
// });
// el.addEventListener("click", function (e) {
// // $(e.target.tip).show();
// // $(e.target.tip.txt).html(e.target.cusData.tudi);
// // $(e.target.tip.pos).html(e.target.cusData.jd);
// console.log("e",e.target.cusData.jd)
// parent.getFromIframe({ data:"办公用地",params:e.target.cusData.jd,type:e.target.cusData.type})
// $(e.target.tip).show();
// $(e.target.tip.txt).html(e.target.cusData.tudi);
// $(e.target.tip.pos).html(e.target.cusData.jd);
// siblingsRomoveClassAct(e.target, 'act',e.target.cusData)
// e.target.className += ' act';
// });
// // 如果不传el会默认给一个蓝色水滴图标
// var mk = new SGMap.Marker(el, {
// // marker相对经纬度点坐标点的位置
// anchor: "bottom",
// // 相对于元素中心点,偏移的像素距离,负数代表向左和向上
// offset: [-15.5, -18]
// });
// mk.setLngLat([lng, lat]);
// mk.addTo(map);
// }
// }
// });
// }
function siblingsRomoveClassActH(e, className) {
var nodeList = e.parentNode.children; //父级的子节点
for (var i = 0; i < nodeList.length; i++) {
//判断是否元素节点 且不是本身 移除要删除的类
if (nodeList[i].nodeType == 1 && nodeList[i] != e) {
var reg = new RegExp('(\\s|^)' + className + '(\\s|$)');
nodeList[i].className = nodeList[i].className.replace(reg, ' ');
} else {
}
}
}
function show(val, index) {
if (val == 'qb') {
visibleTD()
visibleFC()
$(".jd").hide();
} else if (val == 'jd') {
visibleTD()
$(".fc").hide();
$(".jd").hide();
} else {
visibleFC()
$(".td").hide();
$(".jd").hide();
}
}
function visibleFC(val) {
$(".fc").show();
// if(val)
// $(".fc").show();
// else
// $(".fc").hide();
}
function visibleTD(val) {
$(".td").show();
$(".model").show();
}
//
function visiblejd(val) {
$(".jd").show();
}
function visiblejddis(val) {
$(".jd").hide();
}
/*
1.获取2个经纬度之间的距离
2.lng1 lat1 经纬度1
3.lng2 lat2 经纬度2
*/
function getDisance(lng1, lat1, lng2, lat2) {
var dis = 0;
var radius = 6378137;//地球的半径
var radLat1 = toRad(lat1);
var radLat2 = toRad(lat2);
var deltaLat = radLat1 - radLat2;
var deltaLng = toRad(lng1) - toRad(lng2);
var dis =
2 *
Math.asin(
Math.sqrt(
Math.pow(Math.sin(deltaLat / 2), 2) +
Math.cos(radLat1) *
Math.cos(radLat2) *
Math.pow(Math.sin(deltaLng / 2), 2)
)
);
return dis * radius;
}
//获取URL参数
function GetQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]); return null;
}
</script>
</body>
</html>