Commit 7b256872 authored by caicaicai's avatar caicaicai

修改

parent ad06f246
......@@ -39,6 +39,7 @@ export default {
zuobianData:[],
toJavaCoordinates:[],
weilanName:[],
areaColorData:[],
}
},
......@@ -89,6 +90,7 @@ export default {
let data1 = [];
for(let key in res){
that.weilanName.push(key);
that.areaColorData.push(res[key][0].color);
let arrays = [];
res[key].forEach(function(item){
var arr = [];
......@@ -140,18 +142,18 @@ export default {
var graphicLayer = new mars3d.layer.GraphicLayer();
map.addLayer(graphicLayer);
initLayerManager(graphicLayer,that.weilanName[index]);
that.addGraphic_01(graphicLayer,item,that.weilanName[index]);
that.addGraphic_01(graphicLayer,item,that.weilanName[index],that.areaColorData[index]);
})
// 抛出事件
this.$emit('onload', map)
},
//围栏回显
addGraphic_01(graphicLayer,positions,weilanName){
addGraphic_01(graphicLayer,positions,weilanName,color){
let graphic = new mars3d.graphic.PolygonEntity({
positions: positions,
style: {
color: "red",
color: color,
opacity: 0.5,
outline: true,
outlineWidth: 3,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment