|
@@ -1417,8 +1417,8 @@
|
|
|
// loadingGetMap:true,
|
|
|
// })
|
|
|
|
|
|
- let encrypt_low = this_.bd_encrypt(this_.map.getBounds().southwest.lng,this_.map.getBounds().southwest.lat)
|
|
|
- let encrypt_high = this_.bd_encrypt(this_.map.getBounds().northeast.lng,this_.map.getBounds().northeast.lat)
|
|
|
+ let encrypt_low = this_.bd_encrypt(this_.map.getBounds().southwest.lng,this_.map.getBounds().southwest.lat,this_.mapTCtype == 'Satellite')
|
|
|
+ let encrypt_high = this_.bd_encrypt(this_.map.getBounds().northeast.lng,this_.map.getBounds().northeast.lat,this_.mapTCtype == 'Satellite')
|
|
|
|
|
|
this_.cluster.clearMarkers();
|
|
|
baseApi.ajax_post(
|
|
@@ -1500,8 +1500,8 @@
|
|
|
message:data.msg,
|
|
|
type: 'success'
|
|
|
});
|
|
|
- let encrypt_low = this_.bd_encrypt(this_.map.getBounds().getSouthWest().lng(),this_.map.getBounds().getSouthWest().lat())
|
|
|
- let encrypt_high = this_.bd_encrypt(this_.map.getBounds().getNorthEast().lng(),this_.map.getBounds().getNorthEast().lat())
|
|
|
+ let encrypt_low = this_.bd_encrypt(this_.map.getBounds().getSouthWest().lng(),this_.map.getBounds().getSouthWest().lat(),this_.mapTCtype == 'Satellite')
|
|
|
+ let encrypt_high = this_.bd_encrypt(this_.map.getBounds().getNorthEast().lng(),this_.map.getBounds().getNorthEast().lat(),this_.mapTCtype == 'Satellite')
|
|
|
baseApi.ajax_post(
|
|
|
allUrl.gisMap.mapGet,
|
|
|
{
|
|
@@ -2928,17 +2928,12 @@
|
|
|
}
|
|
|
}
|
|
|
this.getProjectCompany(this.lampId,data => {
|
|
|
- let bd_decrypt = this.bd_decrypt(data.data.longitude,data.data.latitude)
|
|
|
- data.data.longitude = bd_decrypt.lng.toFixed(8);
|
|
|
- data.data.latitude = bd_decrypt.lat.toFixed(8);
|
|
|
let JDstr = '';
|
|
|
let WDstr = '';
|
|
|
|
|
|
JDstr = 'longitude';
|
|
|
WDstr = 'latitude';
|
|
|
|
|
|
- this.lampLongitude = data.data.longitude;
|
|
|
- this.lampLatitude = data.data.latitude;
|
|
|
this.rightSideBarType = 'off';
|
|
|
if(document.getElementsByClassName('right_sidebar')[0]){
|
|
|
document.getElementsByClassName('right_sidebar')[0].setAttribute('style', 'width: 0px ;transition:all 0.6s;');
|
|
@@ -2956,6 +2951,12 @@
|
|
|
// this.lampLatitude = data.data.latitude;
|
|
|
|
|
|
if(this.browserLanguage == 'google'){
|
|
|
+ let bd_decrypt = this.bd_decrypt(data.data.longitude,data.data.latitude,this_.mapTCtype == 'Satellite')
|
|
|
+ data.data.longitude = bd_decrypt.lng.toFixed(8);
|
|
|
+ data.data.latitude = bd_decrypt.lat.toFixed(8);
|
|
|
+ this.lampLongitude = data.data.longitude;
|
|
|
+ this.lampLatitude = data.data.latitude;
|
|
|
+
|
|
|
let bgColor = '#31b4fd';
|
|
|
let borderColor = 'rgba(49, 180, 253, 0.18)';
|
|
|
|
|
@@ -2995,7 +2996,7 @@
|
|
|
// console.log(e,this.getPosition())
|
|
|
$('.lampLongitude'+lmId).text(this.getPosition().lng().toFixed(8));
|
|
|
$('.lampLatitude'+lmId).html(this.getPosition().lat().toFixed(8));
|
|
|
- let bd_encrypt = this_.bd_encrypt(this.getPosition().lng().toFixed(8),this.getPosition().lat().toFixed(8))
|
|
|
+ let bd_encrypt = this_.bd_encrypt(this.getPosition().lng().toFixed(8),this.getPosition().lat().toFixed(8),this_.mapTCtype == 'Satellite')
|
|
|
this_.lampLongitude = bd_encrypt.bd_lng;
|
|
|
this_.lampLatitude = bd_encrypt.bd_lat;
|
|
|
})
|
|
@@ -3039,7 +3040,7 @@
|
|
|
})
|
|
|
for(let d of this_.mapDataListHC){
|
|
|
if(d.id == lmId){
|
|
|
- let bd_decrypt = this_.bd_decrypt(this_.lampLongitude,this_.lampLatitude)
|
|
|
+ let bd_decrypt = this_.bd_decrypt(this_.lampLongitude,this_.lampLatitude,this_.mapTCtype == 'Satellite')
|
|
|
d.latitude = bd_decrypt.lat
|
|
|
d.longitude = bd_decrypt.lng
|
|
|
// console.log('-----',d)
|
|
@@ -3667,7 +3668,7 @@
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- let decrypt = this_.bd_decrypt(data.data.longitude,data.data.latitude)
|
|
|
+ let decrypt = this_.bd_decrypt(data.data.longitude,data.data.latitude,this_.mapTCtype == 'Satellite')
|
|
|
data.data.longitude = decrypt.lng;
|
|
|
data.data.latitude = decrypt.lat;
|
|
|
console.log(this_.map,isNew);
|
|
@@ -3680,7 +3681,7 @@
|
|
|
this_.map.setZoom(18);
|
|
|
// console.log(XY)
|
|
|
|
|
|
- XY = [this_.bd_decrypt(XY[0],XY[1]).lng,this_.bd_decrypt(XY[0],XY[1]).lat];
|
|
|
+ XY = [this_.bd_decrypt(XY[0],XY[1]).lng,this_.bd_decrypt(XY[0],XY[1]).lat,this_.mapTCtype == 'Satellite'];
|
|
|
this_.map.setCenter(new google.maps.LatLng(XY[1],XY[0]));
|
|
|
lampId = this_.lampId;
|
|
|
}else if(type != 'del'){
|
|
@@ -3696,8 +3697,8 @@
|
|
|
// loadingGetMap:true,
|
|
|
// })
|
|
|
|
|
|
- let encrypt_low = this_.bd_encrypt(this_.map.getSouthWest().lng(),this_.map.getSouthWest().lat())
|
|
|
- let encrypt_high = this_.bd_encrypt(this_.map.getNorthEast().lng(),this_.map.getNorthEast().lat())
|
|
|
+ let encrypt_low = this_.bd_encrypt(this_.map.getSouthWest().lng(),this_.map.getSouthWest().lat(),this_.mapTCtype == 'Satellite')
|
|
|
+ let encrypt_high = this_.bd_encrypt(this_.map.getNorthEast().lng(),this_.map.getNorthEast().lat(),this_.mapTCtype == 'Satellite')
|
|
|
// console.log(this_.map.getNorthEast().lat(),this)
|
|
|
|
|
|
baseApi.ajax_post(
|
|
@@ -3728,8 +3729,8 @@
|
|
|
}
|
|
|
},1)
|
|
|
google.maps.event.addListener(this_.map,"tilesloaded",function(){
|
|
|
- let encrypt_low = this_.bd_encrypt(this.getBounds().getSouthWest().lng(),this.getBounds().getSouthWest().lat())
|
|
|
- let encrypt_high = this_.bd_encrypt(this.getBounds().getNorthEast().lng(),this.getBounds().getNorthEast().lat())
|
|
|
+ let encrypt_low = this_.bd_encrypt(this.getBounds().getSouthWest().lng(),this.getBounds().getSouthWest().lat(),this_.mapTCtype == 'Satellite')
|
|
|
+ let encrypt_high = this_.bd_encrypt(this.getBounds().getNorthEast().lng(),this.getBounds().getNorthEast().lat(),this_.mapTCtype == 'Satellite')
|
|
|
baseApi.ajax_post(
|
|
|
allUrl.gisMap.mapGet,
|
|
|
{
|
|
@@ -3784,11 +3785,9 @@
|
|
|
}else{
|
|
|
this_.mapTCtype = 'Satellite'
|
|
|
}
|
|
|
- // console.log()
|
|
|
- let mapType = this_.map.getMapTypeId()
|
|
|
for(let d of data){
|
|
|
if(!isTrue){
|
|
|
- let decrypt = this_.bd_decrypt(d.longitude,d.latitude,mapType == 'roadmap');
|
|
|
+ let decrypt = this_.bd_decrypt(d.longitude,d.latitude,this_.mapTCtype == 'Satellite');
|
|
|
d.longitude = decrypt.lng;
|
|
|
d.latitude = decrypt.lat;
|
|
|
}
|
|
@@ -4567,7 +4566,7 @@
|
|
|
}
|
|
|
},
|
|
|
//高德坐标转百度(传入经度、纬度)
|
|
|
- bd_encrypt(lng, lat,isGcj02) {
|
|
|
+ bd_encrypt(lng, lat,isWgs84) {
|
|
|
var PI = 3.1415926535897932384626;
|
|
|
var a = 6378245.0;
|
|
|
var ee = 0.00669342162296594323;
|
|
@@ -4575,7 +4574,7 @@
|
|
|
return (lng < 72.004 || lng > 137.8347) || ((lat < 0.8293 || lat > 55.8271) || false);
|
|
|
// return false;
|
|
|
}
|
|
|
- if (out_of_china(lng, lat)&&isGcj02) {
|
|
|
+ if (out_of_china(lng, lat)||isWgs84) {
|
|
|
return {
|
|
|
bd_lat: lat,
|
|
|
bd_lng: lng
|
|
@@ -4787,7 +4786,7 @@
|
|
|
this.networkId = '';
|
|
|
this.getProjectCompany(curVal,data => {
|
|
|
if(this.lampIdChangeType != 'list'){
|
|
|
- let decrypt = this_.bd_decrypt(data.data.longitude,data.data.latitude);
|
|
|
+ let decrypt = this_.bd_decrypt(data.data.longitude,data.data.latitude,this_.mapTCtype == 'Satellite');
|
|
|
data.data.longitude = decrypt.lng;
|
|
|
data.data.latitude = decrypt.lat;
|
|
|
}
|