| | |
| | | constructor(private subject:NzModalSubject,private coorPickerService:CoorPickerService) { |
| | | this.data = this.coorPickerService.data; |
| | | let lng = this.data.longitude; |
| | | lng = lng ==0 || lng == null ? this.Default_LNG:lng; |
| | | lng = lng === 0 || lng == null ? this.Default_LNG : lng; |
| | | this.data.longitude = lng; |
| | | let lat = this.data.latitude; |
| | | lat = lat == 0||lat == null ? this.Default_LAT:lat; |
| | | lat = lat === 0 || lat == null ? this.Default_LAT : lat; |
| | | this.data.latitude = lat; |
| | | this.options = { |
| | | minZoom:3, |
| | |
| | | this.navigationOpts = { |
| | | anchor: ControlAnchor.BMAP_ANCHOR_BOTTOM_RIGHT, |
| | | type: NavigationControlType.BMAP_NAVIGATION_CONTROL_LARGE |
| | | } |
| | | }; |
| | | this.markerOption.point = { |
| | | lng:lng, |
| | | lat:lat |
| | |
| | | this._localSearch= new this._BMap.LocalSearch(map, { |
| | | renderOptions:{map: map} |
| | | }); |
| | | if(this.data.latitude==this.Default_LAT&&this.data.longitude==this.Default_LNG |
| | | if (this.data.latitude === this.Default_LAT && this.data.longitude === this.Default_LNG |
| | | &&this.data.address!=null){ |
| | | this._localSearch.search(this.data.address); |
| | | } |
| | |
| | | queryTest:string; |
| | | mapSearch(param:any){ |
| | | let text = this.queryTest; |
| | | text = text == null || text.trim() ==''?'昆山市':text; |
| | | text = text == null || text.trim() === '' ? '昆山市' : text; |
| | | this._localSearch.search(text); |
| | | } |
| | | clickMap(e: any) { |