|
...
|
...
|
@@ -189,7 +189,7 @@ Page({ |
|
|
|
if(this.mapCtx){
|
|
|
|
this.mapCtx.getRegion({
|
|
|
|
success:(res)=>{
|
|
|
|
console.log('regionchange.getRegion',res)
|
|
|
|
console.log('regionchange.getRegion.onpos',res)
|
|
|
|
//if(res.southwest.latitude!=this.mapData.region.southwest.latitude) {
|
|
|
|
this.mapData.region = res
|
|
|
|
//this.getMarkers();
|
|
...
|
...
|
@@ -224,7 +224,11 @@ Page({ |
|
|
|
console.log('regionchange.getRegion',res)
|
|
|
|
if(res.southwest.latitude!=this.mapData.region.southwest.latitude) {
|
|
|
|
this.mapData.region = res
|
|
|
|
this.timeoutGetMarkers();
|
|
|
|
if(this.data.hasSuggestion){
|
|
|
|
this.getMarkers();
|
|
|
|
}else{
|
|
|
|
this.timeoutGetMarkers();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
})
|
|
...
|
...
|
@@ -334,10 +338,10 @@ Page({ |
|
|
|
if(!this.user.latitude) return false;//用户无定位
|
|
|
|
if(this.user.latitude==23.099994 && this.user.longitude==113.324520) return false;//默认位置
|
|
|
|
///判断定位 首次 进入视野
|
|
|
|
if(this.user.latitude>map.region.southwest.latitude
|
|
|
|
if((this.user.latitude>map.region.southwest.latitude
|
|
|
|
&& this.user.longitude>map.region.southwest.longitude
|
|
|
|
&& this.user.latitude<map.region.northeast.latitude
|
|
|
|
&& this.user.longitude<map.region.northeast.longitude){
|
|
|
|
&& this.user.longitude<map.region.northeast.longitude) || this.data.hasSuggestion){
|
|
|
|
this.hasInRegionFlag=true;
|
|
|
|
return true;
|
|
|
|
}else{
|
|
...
|
...
|
@@ -584,13 +588,17 @@ Page({ |
|
|
|
ds.setA2LHeight(e.type=='hide'?0:40);
|
|
|
|
},
|
|
|
|
setLocationMarker(markers){
|
|
|
|
let lm=markers[markers.length-1];
|
|
|
|
if(lm && lm.id=='location'){
|
|
|
|
markers=markers.pop();
|
|
|
|
let mks=[]
|
|
|
|
if(markers.length>0){
|
|
|
|
markers.forEach(mk=>{
|
|
|
|
if(mk.id!='location'){
|
|
|
|
mks.push(mk);
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
if(this.data.hasSuggestion){
|
|
|
|
let map = this.data.map;
|
|
|
|
markers.push({
|
|
|
|
mks.push({
|
|
|
|
id: 'location',
|
|
|
|
iconPath: "http://qn.colorcun.com/reserve/images/location.png"+cates_version,
|
|
|
|
latitude: map.latitude,
|
|
...
|
...
|
@@ -599,6 +607,6 @@ Page({ |
|
|
|
height: 25,
|
|
|
|
})
|
|
|
|
}
|
|
|
|
return markers;
|
|
|
|
return mks;
|
|
|
|
},
|
|
|
|
}) |
|
|
\ No newline at end of file |
...
|
...
|
|