xufenglei
2018-08-24 158a0ab4db8c34363e5460dbec287c8af1f0f277
src/main/webapp/js/moralmap.js
@@ -48,7 +48,6 @@
            minZoom: 12,
            maxZoom: 20
        };
       debugger;
       if(!!arguments[1]) {
         $.extend(defaultParam,arguments[1]);
        }
@@ -59,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];
@@ -121,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) {
@@ -158,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() {
@@ -209,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) {
@@ -222,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)
@@ -313,12 +323,12 @@
        if(window["console"]!=undefined){
            console.log(equStr);
        }
        if(!!window['external']&&window['external']['callWin']){
        if(!!window['external']&&!!window['external']['callWin']){
            window['external'].callWin(equStr);
        }else{
             if(!!select&&select==='chart'&&!!window['external']&&window['external']['showChartInfo']){
             if(!!select&&select==='chart'&&!!window['external']&&!!window['external']['showChartInfo']){
                    window['external'].showChartInfo(equStr);
                }else if(!!window['external']&&window['external']['showMonitorInfo']){
                }else if(!!window['external']&&!!window['external']['showMonitorInfo']){
                    window['external'].showMonitorInfo(equStr);
                }else{
                    alert(equStr);
@@ -829,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;