Skip to content

Commit f51cd25

Browse files
committed
feat(ol-vector-layer): add background property
1 parent c45add4 commit f51cd25

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Diff for: docs/componentsguide/layers/vectorlayer/index.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,17 @@ A CSS class name to set to the layer element.
5555

5656
### opacity
5757

58-
- **Type**: `number `
58+
- **Type**: `number`
5959
- **Default**: `1`
6060

6161
Opacity (0, 1).
6262

63+
### background
64+
65+
- **Type**: `BackgroundColor`
66+
67+
A css color, or a function called with a view resolution returning a css color.
68+
6369
### visible
6470

6571
- **Type**: `boolean`

Diff for: src/components/layers/OlVectorLayer.vue

+2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ import {
1616
import type { StyleLike } from "ol/style/Style";
1717
import type { FlatStyleLike } from "ol/style/flat";
1818
import type LayerGroup from "ol/layer/Group";
19+
import type { BackgroundColor } from "ol/layer/Base";
1920
2021
const props = withDefaults(
2122
defineProps<
2223
LayersCommonProps & {
24+
background?: BackgroundColor;
2325
renderBuffer?: number;
2426
updateWhileAnimating?: boolean;
2527
styles?: StyleLike | FlatStyleLike | null;

0 commit comments

Comments
 (0)