瀏覽代碼

修改污染源样式

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

Loading…
取消
儲存