Browse Source

指挥大屏

master
huxinglu 4 years ago
parent
commit
0efd0381e9
2 changed files with 18 additions and 18 deletions
  1. +17
    -18
      src/views/command/index.vue
  2. +1
    -0
      static/nj.json

+ 17
- 18
src/views/command/index.vue View File



<script> <script>
import AMap from "AMap"; import AMap from "AMap";
import njBround from "../../../static/njBround";
import njBround from "../../../static/nj.json";
import dateLeft from './dateLeft' import dateLeft from './dateLeft'
import dateRight from './dateRight' import dateRight from './dateRight'
import {mapGetters} from "vuex"; import {mapGetters} from "vuex";
let list = njBround; let list = njBround;
if (list && list.length > 0) { if (list && list.length > 0) {
list.map(item => { list.map(item => {
var bounds = item.bounds;
if (bounds) {
for (let i = 0, l = bounds.length; i < l; i++) {
let path = [];
bounds[i].map(cc => {
path.push(new AMap.LngLat(cc.lng, cc.lat));
});
let polygon = new AMap.Polygon({
strokeWeight: 1,
path: path,
fillOpacity: 0,
strokeColor: "#9BF1F6"
});
me.polygonList.push(polygon)
me.map.add(polygon);
}
}
var bounds = item;
let path = [];
bounds.map(child => {
delete child.Q
delete child.R
path.push(new AMap.LngLat(child.lng, child.lat));
})
let polygon = new AMap.Polygon({
strokeWeight: 1,
path: path,
fillOpacity: 0,
strokeColor: "#9BF1F6"
});
me.polygonList.push(polygon)
me.map.add(polygon);
}); });
} }
console.log(JSON.stringify(list))
}, },
// addRegionMarker(item) { // addRegionMarker(item) {
// // 创建纯文本标记 // // 创建纯文本标记

+ 1
- 0
static/nj.json
File diff suppressed because it is too large
View File


Loading…
Cancel
Save