|
...
|
...
|
@@ -43,6 +43,7 @@ Page({ |
|
|
|
hasGetSellersEnd:false,
|
|
|
|
hasSetActivity:false,
|
|
|
|
},
|
|
|
|
hasClickMoveToLocation:false,//点击回到我的位置
|
|
|
|
hasSellerConcat:hasSellerConcat,
|
|
|
|
transverseViewHeight:transverseViewHeight,//横向滚动高度,苹果要比安卓多20
|
|
|
|
//qqmapsdk:null,
|
|
...
|
...
|
@@ -224,8 +225,12 @@ Page({ |
|
|
|
});
|
|
|
|
this.mapCtx.getRegion({
|
|
|
|
success:(res)=>{
|
|
|
|
console.log('regionchange.getRegion',res)
|
|
|
|
if((res.southwest.latitude!=this.mapData.region.southwest.latitude) || this.data.hasSuggestion) {
|
|
|
|
console.log('regionchange.getRegion',res.southwest.latitude,this.mapData.region.southwest.latitude,res)
|
|
|
|
if((res.southwest.latitude!=this.mapData.region.southwest.latitude)
|
|
|
|
|| this.data.hasSuggestion
|
|
|
|
|| this.hasClickMoveToLocation
|
|
|
|
) {
|
|
|
|
this.hasClickMoveToLocation=false
|
|
|
|
this.mapData.region = res
|
|
|
|
this.timeoutGetMarkers();
|
|
|
|
}
|
|
...
|
...
|
@@ -485,13 +490,8 @@ Page({ |
|
|
|
wx.showTabBar();
|
|
|
|
},
|
|
|
|
moveToLocation(){
|
|
|
|
if(this.user.latitude==def_latitude){
|
|
|
|
this.selectComponent('#getpos').getPos(true);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
this.hasClickMoveToLocation=true
|
|
|
|
let map=this.data.map;
|
|
|
|
console.log(this.user.latitude,this.mapData.latitude,def_latitude);
|
|
|
|
if(this.user.latitude==this.mapData.latitude && this.user.longitude==this.mapData.longitude) return;
|
|
|
|
map.latitude=this.user.latitude
|
|
|
|
map.longitude=this.user.longitude
|
|
|
|
map.scale=mapScale;
|
|
...
|
...
|
@@ -502,6 +502,13 @@ Page({ |
|
|
|
map:map,
|
|
|
|
hasSuggestion:false,
|
|
|
|
})
|
|
|
|
if(this.user.latitude==def_latitude && this.user.longitude==def_longitude){
|
|
|
|
this.selectComponent('#getpos').getPos(true);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
//console.log(this.user.latitude,this.mapData.latitude,def_latitude);
|
|
|
|
//if(this.user.latitude==this.mapData.latitude && this.user.longitude==this.mapData.longitude) return;
|
|
|
|
//if(this.user.latitude==def_latitude && this.user.longitude==def_longitude) return;
|
|
|
|
this.mapCtx.moveToLocation({
|
|
|
|
success:(res)=>{
|
|
|
|
console.log('moveToLocation',res)
|
...
|
...
|
|