|
...
|
...
|
@@ -250,10 +250,10 @@ Page({ |
|
|
|
this.mapCtx.getRegion({
|
|
|
|
success:(res)=>{
|
|
|
|
console.log('onpos.getRegion',res)
|
|
|
|
//if(res.southwest.latitude!=this.mapData.region.southwest.latitude) {
|
|
|
|
this.mapData.region = res
|
|
|
|
//this.getMarkers();
|
|
|
|
//}
|
|
|
|
if(this.mapData.region.southwest.latitude) {
|
|
|
|
this.mapData.region = res
|
|
|
|
//this.getMarkers();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
})
|
|
|
|
}
|
|
...
|
...
|
@@ -283,7 +283,9 @@ Page({ |
|
|
|
success:(res)=>{
|
|
|
|
console.log('regionchange.getRegion',res.southwest.latitude,this.mapData.region.southwest.latitude,res)
|
|
|
|
this.hasClickMoveToLocation=false
|
|
|
|
this.mapData.region = res
|
|
|
|
if(res.southwest.latitude) {
|
|
|
|
this.mapData.region = res
|
|
|
|
};
|
|
|
|
this.timeoutGetMarkers();
|
|
|
|
},
|
|
|
|
})
|
|
...
|
...
|
@@ -296,7 +298,7 @@ Page({ |
|
|
|
}
|
|
|
|
this.setTimeoutGetMarkers=setTimeout(()=>{
|
|
|
|
this.getMarkers();
|
|
|
|
},500)
|
|
|
|
},300)
|
|
|
|
},
|
|
|
|
mapUpdated(e){
|
|
|
|
console.log('mapUpdated', e)
|
|
...
|
...
|
@@ -321,12 +323,10 @@ Page({ |
|
|
|
});
|
|
|
|
this.mapCtx.getRegion({
|
|
|
|
success:(res)=>{
|
|
|
|
console.log('mapUpdated.getRegion',res)
|
|
|
|
//if(res.southwest.latitude!=this.mapData.region.southwest.latitude){
|
|
|
|
this.mapData.region=res
|
|
|
|
//this.getMarkers();
|
|
|
|
//}
|
|
|
|
|
|
|
|
if(this.mapData.region.southwest.latitude=='' || !res.southwest.latitude) return;
|
|
|
|
console.log('mapUpdated.getRegion',[res.southwest.latitude,this.mapData.region.southwest.latitude])
|
|
|
|
this.mapData.region=res
|
|
|
|
//this.timeoutGetMarkers();
|
|
|
|
},
|
|
|
|
})
|
|
|
|
},
|
|
...
|
...
|
@@ -458,6 +458,10 @@ Page({ |
|
|
|
if(tags.length>0){
|
|
|
|
param.tags=tags;
|
|
|
|
}
|
|
|
|
param.centre_pos=`${this.mapData.latitude},${this.mapData.longitude}`
|
|
|
|
if(this.data.hasSuggestion){
|
|
|
|
param.centre_pos=`${this.data.suggestion.latitude},${this.data.suggestion.longitude}`
|
|
|
|
}
|
|
|
|
this.selectComponent('#list').getList(param);
|
|
|
|
this.param=param;
|
|
|
|
let now_sid=[];
|
|
...
|
...
|
@@ -701,25 +705,36 @@ Page({ |
|
|
|
ds.setA2LHeight(e.type=='hide'?0:40);
|
|
|
|
},
|
|
|
|
setLocationMarker(markers){
|
|
|
|
let map = this.mapData;
|
|
|
|
let mks=[]
|
|
|
|
let matchPosNum=1
|
|
|
|
if(markers.length>0){
|
|
|
|
markers.forEach(mk=>{
|
|
|
|
if(mk.id!='location'){
|
|
|
|
if(mk.id!='location'
|
|
|
|
&& mk.latitude>map.region.southwest.latitude
|
|
|
|
&& mk.longitude>map.region.southwest.longitude
|
|
|
|
&& mk.latitude<map.region.northeast.latitude
|
|
|
|
&& mk.longitude<map.region.northeast.longitude){
|
|
|
|
mks.push(mk);
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
//if(this.data.hasSuggestion){
|
|
|
|
let map = this.data.map;
|
|
|
|
mks.push({
|
|
|
|
id: 'location',
|
|
|
|
iconPath: "http://qn.colorcun.com/reserve/images/location.png"+cates_version,
|
|
|
|
latitude: map.latitude,
|
|
|
|
longitude: map.longitude,
|
|
|
|
width: 20,
|
|
|
|
height: 25,
|
|
|
|
})
|
|
|
|
//}
|
|
|
|
if(mks.length-markers.length<0){
|
|
|
|
this.timeoutGetMarkers()
|
|
|
|
return []
|
|
|
|
}
|
|
|
|
|
|
|
|
if(this.data.hasSuggestion){
|
|
|
|
map=this.data.suggestion
|
|
|
|
}
|
|
|
|
mks.push({
|
|
|
|
id: 'location',
|
|
|
|
iconPath: "http://qn.colorcun.com/reserve/images/location.png"+cates_version,
|
|
|
|
latitude: map.latitude,
|
|
|
|
longitude: map.longitude,
|
|
|
|
width: 20,
|
|
|
|
height: 25,
|
|
|
|
})
|
|
|
|
return mks;
|
|
|
|
},
|
|
|
|
tagsChange(e){
|
|
...
|
...
|
@@ -786,6 +801,7 @@ Page({ |
|
|
|
map:this.param.map,
|
|
|
|
multiIndex:this.data.multiIndex,
|
|
|
|
tags:this.param.tags,
|
|
|
|
centre_pos:this.param.centre_pos,
|
|
|
|
},'./indexList')
|
|
|
|
});
|
|
|
|
},
|
...
|
...
|
|