From b548f17e642210ac5301db8493b5b5fe28dfab65 Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Mon, 13 Aug 2018 14:43:56 +0800
Subject: [PATCH] 地图更新
---
src/main/webapp/js/moralmap.js | 30 +++++++++++++++++++++---------
1 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/src/main/webapp/js/moralmap.js b/src/main/webapp/js/moralmap.js
index 74727d4..594e11a 100644
--- a/src/main/webapp/js/moralmap.js
+++ b/src/main/webapp/js/moralmap.js
@@ -120,7 +120,7 @@
var startZoom = moralMap.startZoom();
//������key������������������
// var key = moralMap.lazyKeyer();
- var confine = moralMap.getZooMConfine();
+ var confine = moralMap.getZoomConfine();
if(endZoom > startZoom) {
//������������������
if(endZoom >= confine && startZoom <= confine) {
@@ -157,13 +157,13 @@
if(!!baiduBounds){
this.northeastLng = baiduBounds.xl.lng;//���������������������������
this.northeastLat = baiduBounds.xl.lat;//���������������������������
- this.southwestLng = baiduBounds.Ol.lng;//���������������������������������
- this.southwestLat = baiduBounds.Ol.lat;//���������������������������������
+ this.southwestLng = baiduBounds.Ol.lng;//���������������������������������
+ this.southwestLat = baiduBounds.Ol.lat;//���������������������������������
}else{
this.northeastLng = null;//���������������������������
this.northeastLat = null;//���������������������������
- this.southwestLng = null;//���������������������������������
- this.southwestLat = null;//���������������������������������
+ this.southwestLng = null;//���������������������������������
+ this.southwestLat = null;//���������������������������������
}
}
moralMap.getBounds = function() {
@@ -208,9 +208,10 @@
}
moralMap.addOverlay = function(overlay) {
if(overlay.getMap() != baiduMap) {
- setTimeout(function(){
+ // setTimeout(function(){
baiduMap.addOverlay.call(baiduMap, overlay);
- },10);
+ // },10);
+ baiduMap.addOverlay.call(baiduMap, overlay);
}
}
moralMap.addOverlays = function(overlays) {
@@ -221,8 +222,16 @@
}
}
- moralMap.removeOverlay = function() {
+ moralMap.removeOverlay = function(overlay) {
+ // baiduMap.removeOverlay(overlay);
baiduMap.removeOverlay.apply(baiduMap, arguments);
+ }
+ moralMap.removeOverlays = function(overlays) {
+ if(overlays != null && typeof overlays == 'object') {
+ for (var i in overlays) {
+ moralMap.removeOverlay(overlays[i]);
+ }
+ }
}
moralMap.getOverlays = function() {
var overLays = baiduMap.getOverlays.apply(baiduMap, arguments)
@@ -828,9 +837,12 @@
delete moralMap['_equipments'];
}
}
- moralMap.getZooMConfine = function() {
+ moralMap.getZoomConfine = function() {
return 18;
}
+ moralMap.getZoom = function() {
+ return baiduMap.getZoom();
+ }
moralMap.getHorizonMarkers = function(isShow) {
var bounds = moralMap.getBounds();
var oldMarkerList;
--
Gitblit v1.8.0