|
|
@ -381,6 +381,9 @@ import {dataType} from 'black-knight/lib/config/tools' |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
activated(){ |
|
|
|
console.log("-------activated---------------") |
|
|
|
}, |
|
|
|
methods:{ |
|
|
|
async afterRead(e){ |
|
|
|
this.imgList=this.imgList.concat(e.file.map(v=>Object.assign(v,{ |
|
|
@ -426,27 +429,34 @@ import {dataType} from 'black-knight/lib/config/tools' |
|
|
|
this.showMap=true |
|
|
|
if(!this.maps){ |
|
|
|
var amap=uni.createMapContext("amap",this) |
|
|
|
|
|
|
|
this.maps=amap.$getAppMap() |
|
|
|
this.maps.setMapType(plus.maps.MapType.MAPTYPE_SATELLITE) |
|
|
|
this.maps.onclick=(e)=>{ |
|
|
|
console.log(e,'-------maps--click---------') |
|
|
|
} |
|
|
|
var polygon=new plus.maps.Polygon([ |
|
|
|
new plus.maps.Point(116.39524,39.925301), |
|
|
|
new plus.maps.Point(116.400444,39.925285), |
|
|
|
new plus.maps.Point(116.400558,39.923282), |
|
|
|
new plus.maps.Point(116.395502,39.923082), |
|
|
|
]) |
|
|
|
polygon.setLineWidth(2) |
|
|
|
polygon.setStrokeColor("#10C176") |
|
|
|
polygon.setFillColor("#10C176") |
|
|
|
polygon.setFillOpacity(0.3) |
|
|
|
this.maps.addOverlay(polygon) |
|
|
|
// var polygon=new plus.maps.Polygon([ |
|
|
|
// new plus.maps.Point(116.39524,39.925301), |
|
|
|
// new plus.maps.Point(116.400444,39.925285), |
|
|
|
// new plus.maps.Point(116.400558,39.923282), |
|
|
|
// new plus.maps.Point(116.395502,39.923082), |
|
|
|
// ]) |
|
|
|
// polygon.setLineWidth(2) |
|
|
|
// polygon.setStrokeColor("#10C176") |
|
|
|
// polygon.setFillColor("#10C176") |
|
|
|
// polygon.setFillOpacity(0.3) |
|
|
|
// this.maps.addOverlay(polygon) |
|
|
|
|
|
|
|
var marker=new plus.maps.Marker(new plus.maps.Point(116.396137,39.924055)); |
|
|
|
marker.setIcon("/static/tab_home.png"); |
|
|
|
marker.setIcon("/static/map_point_1.png"); |
|
|
|
marker.bringToTop() |
|
|
|
marker.setDraggable(true) |
|
|
|
marker.onclick= e=>{ |
|
|
|
console.log('---onclick----') |
|
|
|
} |
|
|
|
marker.onDrag= e=>{ |
|
|
|
console.log("-----Drag:",JSON.stringify(e.getPoint())) |
|
|
|
} |
|
|
|
this.maps.addOverlay(marker); |
|
|
|
} |
|
|
|
/* #endif */ |
|
|
|