Переглянути джерело

修改污染源样式

jiexi1_1
YF-yuan 3 роки тому
джерело
коміт
b15d624214
1 змінених файлів з 11 додано та 7 видалено
  1. +11
    -7
      src/views/Home.vue

+ 11
- 7
src/views/Home.vue Переглянути файл

@@ -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);

Завантаження…
Відмінити
Зберегти