效果:
核心代码:
style: (feature) => {
let style1 = new CreateStyle({
fill: CreateStyle.initFill("rgba(77, 146, 194,1)"),
stroke: CreateStyle.initStroke({
color: "rgba(9, 103, 189,1)",
width: 7,
}),
}).initStyleWithOptions();
let style2 = new CreateStyle({
fill: CreateStyle.initFill("rgba(77, 146, 194,1)"),
stroke: CreateStyle.initStroke({
color: "rgba(255, 255, 255,1)",
width: 2,
}),
}).initStyleWithOptions();
return [style1,style2];
},