From 2d0b1b3da347f201cfe608e426fb2b7fdb9629a7 Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Fri, 17 Aug 2018 17:13:27 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/main/webapp/js/moralmap.js | 34 ++++++++++++++++++++++++----------
1 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/src/main/webapp/js/moralmap.js b/src/main/webapp/js/moralmap.js
index 74727d4..f65701f 100644
--- a/src/main/webapp/js/moralmap.js
+++ b/src/main/webapp/js/moralmap.js
@@ -58,7 +58,9 @@
style: "normal" //������������������������������
}
map.setMapStyle(mapStyle);
- var showZoom = 12;
+ var showZoom = !!arguments[2]
+ && arguments[2] <=defaultParam.maxZoom
+ && arguments[2] >= defaultParam.minZoom?arguments[2]:12;
var address = arguments[0];
var regoinNames = address.split(" ");
var cityName = regoinNames.length>1?regoinNames[1]:regoinNames[0];
@@ -120,7 +122,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 +159,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 +210,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 +224,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 +839,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