|
@@ -43,6 +43,7 @@ Page({ |
|
@@ -43,6 +43,7 @@ Page({ |
|
43
|
hasGetSellersEnd:false,
|
43
|
hasGetSellersEnd:false,
|
|
44
|
hasSetActivity:false,
|
44
|
hasSetActivity:false,
|
|
45
|
},
|
45
|
},
|
|
|
|
46
|
+ hasClickMoveToLocation:false,//点击回到我的位置
|
|
46
|
hasSellerConcat:hasSellerConcat,
|
47
|
hasSellerConcat:hasSellerConcat,
|
|
47
|
transverseViewHeight:transverseViewHeight,//横向滚动高度,苹果要比安卓多20
|
48
|
transverseViewHeight:transverseViewHeight,//横向滚动高度,苹果要比安卓多20
|
|
48
|
//qqmapsdk:null,
|
49
|
//qqmapsdk:null,
|
|
@@ -224,8 +225,12 @@ Page({ |
|
@@ -224,8 +225,12 @@ Page({ |
|
224
|
});
|
225
|
});
|
|
225
|
this.mapCtx.getRegion({
|
226
|
this.mapCtx.getRegion({
|
|
226
|
success:(res)=>{
|
227
|
success:(res)=>{
|
|
227
|
- console.log('regionchange.getRegion',res)
|
|
|
|
228
|
- if((res.southwest.latitude!=this.mapData.region.southwest.latitude) || this.data.hasSuggestion) {
|
228
|
+ console.log('regionchange.getRegion',res.southwest.latitude,this.mapData.region.southwest.latitude,res)
|
|
|
|
229
|
+ if((res.southwest.latitude!=this.mapData.region.southwest.latitude)
|
|
|
|
230
|
+ || this.data.hasSuggestion
|
|
|
|
231
|
+ || this.hasClickMoveToLocation
|
|
|
|
232
|
+ ) {
|
|
|
|
233
|
+ this.hasClickMoveToLocation=false
|
|
229
|
this.mapData.region = res
|
234
|
this.mapData.region = res
|
|
230
|
this.timeoutGetMarkers();
|
235
|
this.timeoutGetMarkers();
|
|
231
|
}
|
236
|
}
|
|
@@ -485,13 +490,8 @@ Page({ |
|
@@ -485,13 +490,8 @@ Page({ |
|
485
|
wx.showTabBar();
|
490
|
wx.showTabBar();
|
|
486
|
},
|
491
|
},
|
|
487
|
moveToLocation(){
|
492
|
moveToLocation(){
|
|
488
|
- if(this.user.latitude==def_latitude){
|
|
|
|
489
|
- this.selectComponent('#getpos').getPos(true);
|
|
|
|
490
|
- return;
|
|
|
|
491
|
- }
|
493
|
+ this.hasClickMoveToLocation=true
|
|
492
|
let map=this.data.map;
|
494
|
let map=this.data.map;
|
|
493
|
- console.log(this.user.latitude,this.mapData.latitude,def_latitude);
|
|
|
|
494
|
- if(this.user.latitude==this.mapData.latitude && this.user.longitude==this.mapData.longitude) return;
|
|
|
|
495
|
map.latitude=this.user.latitude
|
495
|
map.latitude=this.user.latitude
|
|
496
|
map.longitude=this.user.longitude
|
496
|
map.longitude=this.user.longitude
|
|
497
|
map.scale=mapScale;
|
497
|
map.scale=mapScale;
|
|
@@ -502,6 +502,13 @@ Page({ |
|
@@ -502,6 +502,13 @@ Page({ |
|
502
|
map:map,
|
502
|
map:map,
|
|
503
|
hasSuggestion:false,
|
503
|
hasSuggestion:false,
|
|
504
|
})
|
504
|
})
|
|
|
|
505
|
+ if(this.user.latitude==def_latitude && this.user.longitude==def_longitude){
|
|
|
|
506
|
+ this.selectComponent('#getpos').getPos(true);
|
|
|
|
507
|
+ return;
|
|
|
|
508
|
+ }
|
|
|
|
509
|
+ //console.log(this.user.latitude,this.mapData.latitude,def_latitude);
|
|
|
|
510
|
+ //if(this.user.latitude==this.mapData.latitude && this.user.longitude==this.mapData.longitude) return;
|
|
|
|
511
|
+ //if(this.user.latitude==def_latitude && this.user.longitude==def_longitude) return;
|
|
505
|
this.mapCtx.moveToLocation({
|
512
|
this.mapCtx.moveToLocation({
|
|
506
|
success:(res)=>{
|
513
|
success:(res)=>{
|
|
507
|
console.log('moveToLocation',res)
|
514
|
console.log('moveToLocation',res)
|