Commit 08aee6dad718b4af799bbde3b2eacd68f2a9d776

Authored by wangfan
1 parent abd7c0fb

C端地图

Showing 1 changed file with 11 additions and 3 deletions
@@ -65,8 +65,8 @@ Page({ @@ -65,8 +65,8 @@ Page({
65 mapData:{ 65 mapData:{
66 lat:'', 66 lat:'',
67 lng:'', 67 lng:'',
68 - latitude: 23.099994,  
69 - longitude: 113.324520, 68 + latitude: 0,
  69 + longitude: 0,
70 scale: 18, 70 scale: 18,
71 hasRegionchange:false, 71 hasRegionchange:false,
72 region:{ 72 region:{
@@ -171,7 +171,7 @@ Page({ @@ -171,7 +171,7 @@ Page({
171 console.log('regionchange.getRegion',res) 171 console.log('regionchange.getRegion',res)
172 //if(res.southwest.latitude!=this.mapData.region.southwest.latitude) { 172 //if(res.southwest.latitude!=this.mapData.region.southwest.latitude) {
173 this.mapData.region = res 173 this.mapData.region = res
174 - this.getMarkers(); 174 + //this.getMarkers();
175 //} 175 //}
176 }, 176 },
177 }) 177 })
@@ -326,6 +326,14 @@ Page({ @@ -326,6 +326,14 @@ Page({
326 && this.user.longitude<map.region.northeast.longitude){ 326 && this.user.longitude<map.region.northeast.longitude){
327 this.hasInRegionFlag=true; 327 this.hasInRegionFlag=true;
328 return true; 328 return true;
  329 + }else{
  330 + //视野不匹配
  331 + this.mapCtx.getRegion({
  332 + success:(res)=>{
  333 + console.log('mapUpdated.getRegion',res)
  334 + this.mapData.region=res
  335 + },
  336 + })
329 } 337 }
330 return false; 338 return false;
331 }, 339 },