Commit 8bcc016c503a30619f33e898acfd68c3eaa4f4b5

Authored by vking
1 parent c18e4947

移动或缩放地图,获取更多餐厅

Showing 1 changed file with 8 additions and 4 deletions
@@ -26,8 +26,8 @@ Page({ @@ -26,8 +26,8 @@ Page({
26 */ 26 */
27 data: { 27 data: {
28 map: { 28 map: {
29 - latitude: def_latitude,  
30 - longitude: def_longitude, 29 + latitude: def_latitude+0.0001,
  30 + longitude: def_longitude+0.0001,
31 scale: mapScale, 31 scale: mapScale,
32 height: 300, 32 height: 300,
33 }, 33 },
@@ -184,7 +184,7 @@ Page({ @@ -184,7 +184,7 @@ Page({
184 this.selectComponent('#getpos').getPos(); 184 this.selectComponent('#getpos').getPos();
185 if(!this.hasClickMoveToLocation){ 185 if(!this.hasClickMoveToLocation){
186 //this.getMarkers(); 186 //this.getMarkers();
187 - this.timeoutGetMarkers(); 187 + //this.timeoutGetMarkers();
188 } 188 }
189 189
190 }, 190 },
@@ -245,6 +245,8 @@ Page({ @@ -245,6 +245,8 @@ Page({
245 sdobj.markers=[] 245 sdobj.markers=[]
246 } 246 }
247 this.setData(sdobj) 247 this.setData(sdobj)
  248 + this.timeoutGetMarkers()
  249 + /*
248 if(this.mapCtx){ 250 if(this.mapCtx){
249 //this.mapCtx.moveToLocation(); 251 //this.mapCtx.moveToLocation();
250 this.mapCtx.getRegion({ 252 this.mapCtx.getRegion({
@@ -252,13 +254,15 @@ Page({ @@ -252,13 +254,15 @@ Page({
252 console.log('onpos.getRegion',res) 254 console.log('onpos.getRegion',res)
253 if(this.mapData.region.southwest.latitude) { 255 if(this.mapData.region.southwest.latitude) {
254 this.mapData.region = res 256 this.mapData.region = res
255 - //this.getMarkers(); 257 + this.timeoutGetMarkers()
256 } 258 }
257 }, 259 },
258 }) 260 })
259 } 261 }
  262 + */
260 }, 263 },
261 regionchange(e){ 264 regionchange(e){
  265 + if(e.type!='end') return;
262 console.log('regionchange', e) 266 console.log('regionchange', e)
263 if(typeof this.mapCtx=='undefined' || !this.mapCtx) return; 267 if(typeof this.mapCtx=='undefined' || !this.mapCtx) return;
264 this.getClassNameFlag=true; 268 this.getClassNameFlag=true;