|
@ -68,6 +68,7 @@ export default { |
|
|
var points=await this.getDetail() |
|
|
var points=await this.getDetail() |
|
|
|
|
|
|
|
|
this.maps=amap.$getAppMap() |
|
|
this.maps=amap.$getAppMap() |
|
|
|
|
|
|
|
|
this.maps.setMapType(plus.maps.MapType.MAPTYPE_SATELLITE) |
|
|
this.maps.setMapType(plus.maps.MapType.MAPTYPE_SATELLITE) |
|
|
if(points.length>0){ |
|
|
if(points.length>0){ |
|
|
var bound=computeArea(points) |
|
|
var bound=computeArea(points) |
|
@ -80,7 +81,13 @@ export default { |
|
|
polygon.setFillOpacity(0.3) |
|
|
polygon.setFillOpacity(0.3) |
|
|
this.maps.addOverlay(polygon) |
|
|
this.maps.addOverlay(polygon) |
|
|
}else{ |
|
|
}else{ |
|
|
this.maps.centerAndZoom(new plus.maps.Point(102.712251,25.040609),10) |
|
|
this.maps.getUserLocation((state,point)=>{ |
|
|
|
|
|
if(state==0){ |
|
|
|
|
|
this.maps.centerAndZoom(new plus.maps.Point(point.longitude, point.latitude),10) |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.maps.centerAndZoom(new plus.maps.Point(102.712251,25.040609),10) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* #endif */ |
|
|
/* #endif */ |
|
|