Browse Source

修改污染源样式

jiexi1_1
YF-yuan 3 years ago
parent
commit
b15d624214
1 changed files with 11 additions and 7 deletions
  1. +11
    -7
      src/views/Home.vue

+ 11
- 7
src/views/Home.vue View File

@@ -9,7 +9,8 @@
<ul id="landmark" v-if="isPlace">
<li class="landItem" v-for="(item, index) in landuseList" :key="index">
<span class="landName">{{ item.lc }}</span>
<span class="landcolor" :style="{ background: item.color }"></span>
<span class="landcolor" :style="{background: item.color}"></span>
<!-- <span class="landcolor" :style="{border: '2px solid' +item.color}"></span> -->
</li>
</ul>

@@ -552,12 +553,15 @@ export default {

let styleFunction = this.landColor.map((item) => {
let style = new Style({
stroke: new Stroke({
color: item[1],
width: 3
}),
// stroke: new Stroke({
// color: item[1],
// width: 3
// }),
// fill: new Fill({
// color: 'rgba(0,0,0,0)'
// })
fill: new Fill({
color: 'rgba(0,0,0,0)'
color: item[1]
})
});
return [item[0], style];
@@ -589,7 +593,7 @@ export default {

this.place = new VectorLayer({
source: vector,
// opacity: 0.5,
opacity: 0.6,
style: (feature) => {
let lc = feature.getProperties().lc;
return styleFunction.get(lc);

Loading…
Cancel
Save