Showing
1 changed file
with
5 additions
and
12 deletions
| @@ -180,15 +180,19 @@ Page({ | @@ -180,15 +180,19 @@ Page({ | ||
| 180 | let res=e.detail; | 180 | let res=e.detail; |
| 181 | this.hasGetLocation=true; | 181 | this.hasGetLocation=true; |
| 182 | if(!res.latitude) return; | 182 | if(!res.latitude) return; |
| 183 | + this.sellersIds=[] | ||
| 184 | + this.sellers=[] | ||
| 183 | let map = this.data.map; | 185 | let map = this.data.map; |
| 184 | map.latitude = res.latitude; | 186 | map.latitude = res.latitude; |
| 185 | map.longitude = res.longitude; | 187 | map.longitude = res.longitude; |
| 186 | - | 188 | + map.scale=mapScale; |
| 187 | this.user.latitude = res.latitude; | 189 | this.user.latitude = res.latitude; |
| 188 | this.user.longitude = res.longitude; | 190 | this.user.longitude = res.longitude; |
| 189 | map.height = this.systemInfo.windowHeight-this.transverseViewHeight | 191 | map.height = this.systemInfo.windowHeight-this.transverseViewHeight |
| 190 | this.setData({ | 192 | this.setData({ |
| 191 | map: map, | 193 | map: map, |
| 194 | + markers:[], | ||
| 195 | + hasSuggestion:false, | ||
| 192 | }) | 196 | }) |
| 193 | if(this.mapCtx){ | 197 | if(this.mapCtx){ |
| 194 | this.mapCtx.getRegion({ | 198 | this.mapCtx.getRegion({ |
| @@ -491,17 +495,6 @@ Page({ | @@ -491,17 +495,6 @@ Page({ | ||
| 491 | }, | 495 | }, |
| 492 | moveToLocation(){ | 496 | moveToLocation(){ |
| 493 | this.hasClickMoveToLocation=true | 497 | this.hasClickMoveToLocation=true |
| 494 | - let map=this.data.map; | ||
| 495 | - map.latitude=this.user.latitude | ||
| 496 | - map.longitude=this.user.longitude | ||
| 497 | - map.scale=mapScale; | ||
| 498 | - this.sellersIds=[] | ||
| 499 | - this.sellers=[] | ||
| 500 | - this.setData({ | ||
| 501 | - markers:[], | ||
| 502 | - map:map, | ||
| 503 | - hasSuggestion:false, | ||
| 504 | - }) | ||
| 505 | if(this.user.latitude==def_latitude && this.user.longitude==def_longitude){ | 498 | if(this.user.latitude==def_latitude && this.user.longitude==def_longitude){ |
| 506 | this.selectComponent('#getpos').getPos(true); | 499 | this.selectComponent('#getpos').getPos(true); |
| 507 | return; | 500 | return; |
-
Please register or login to post a comment