| | |
| | | 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) { |
| | |
| | | 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() { |
| | |
| | | } |
| | | 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) { |
| | |
| | | } |
| | | |
| | | } |
| | | 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) |
| | |
| | | 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; |