| | |
| | | _bounds.southwestLat = _bounds.southwestLat || bs.southwestLat; |
| | | _bounds.northeastLng = bs.northeastLng > _bounds.northeastLng ? bs.northeastLng: _bounds.northeastLng; |
| | | _bounds.northeastLat = bs.northeastLat > _bounds.northeastLat ? bs.northeastLat: _bounds.northeastLat; |
| | | _bounds.southwestLng = bs.southwestLng > _bounds.southwestLng ? bs.southwestLng: _bounds.southwestLng; |
| | | _bounds.southwestLat = bs.southwestLat > _bounds.southwestLat ? bs.southwestLat: _bounds.southwestLat; |
| | | _bounds.southwestLng = bs.southwestLng < _bounds.southwestLng ? bs.southwestLng: _bounds.southwestLng; |
| | | _bounds.southwestLat = bs.southwestLat < _bounds.southwestLat ? bs.southwestLat: _bounds.southwestLat; |
| | | this[key] = _bounds; |
| | | } |
| | | moralMap.isOverBounds = function() { |
| | |
| | | isOver = true; |
| | | moralMap.setMaxBounds(bs); |
| | | } else { |
| | | debugger; |
| | | isOver = (bs.northeastLng > _bounds.northeastLng |
| | | || bs.northeastLat > _bounds.northeastLat |
| | | || bs.southwestLng > _bounds.southwestLng |
| | | || bs.southwestLat > _bounds.southwestLat); |
| | | || bs.southwestLng < _bounds.southwestLng |
| | | || bs.southwestLat < _bounds.southwestLat); |
| | | if(isOver){ |
| | | moralMap.setMaxBounds(bs); |
| | | } |
| | |
| | | if(typeof option == 'object') { |
| | | var longitude = option['longitude']; |
| | | var latitude = option['latitude']; |
| | | // 检索当前坐标范围内的组件 |
| | | if(longitude < bounds.northeastLng && longitude > bounds.southwestLng && latitude < bounds.northeastLat && latitude > bounds.southwestLat) { |
| | | markers.push(oldmarker); |
| | | } |