|
...
|
...
|
@@ -201,7 +201,6 @@ Page({ |
|
|
|
console.log('regionchange.getScale', res, this.data.map.scale)
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
this.mapCtx.getCenterLocation({
|
|
|
|
success:(res)=>{
|
|
|
|
console.log('regionchange.getCenterLocation',res)
|
|
...
|
...
|
@@ -218,11 +217,21 @@ Page({ |
|
|
|
console.log('regionchange.getRegion',res)
|
|
|
|
if(res.southwest.latitude!=this.mapData.region.southwest.latitude) {
|
|
|
|
this.mapData.region = res
|
|
|
|
this.getMarkers();
|
|
|
|
this.timeoutGetMarkers();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
})
|
|
|
|
},
|
|
|
|
setTimeoutGetMarkers:'',
|
|
|
|
timeoutGetMarkers(){//延时获取
|
|
|
|
if(this.setTimeoutGetMarkers){
|
|
|
|
clearTimeout(this.setTimeoutGetMarkers);
|
|
|
|
this.setTimeoutGetMarkers='';
|
|
|
|
}
|
|
|
|
this.setTimeoutGetMarkers=setTimeout(()=>{
|
|
|
|
this.getMarkers();
|
|
|
|
},1200)
|
|
|
|
},
|
|
|
|
mapUpdated(e){
|
|
|
|
console.log('mapUpdated', e)
|
|
|
|
this.getClassNameFlag=true;
|
|
...
|
...
|
@@ -351,7 +360,7 @@ Page({ |
|
|
|
lat: this.user.latitude,
|
|
|
|
lng: this.user.longitude,
|
|
|
|
offset: 0,
|
|
|
|
rows: 10000,
|
|
|
|
rows: 50,
|
|
|
|
distance: 100000,
|
|
|
|
map:JSON.stringify({...this.mapData.region,scale:this.mapData.scale})
|
|
|
|
}
|
...
|
...
|
|