Skip to content

Commit 9e6dc68

Browse files
committed
Revert "docs(ol-source-*): drop opaque option since it has been removed with OpenLayers 10"
This reverts commit 8de0e3d.
1 parent 7726424 commit 9e6dc68

File tree

6 files changed

+12
-1
lines changed

6 files changed

+12
-1
lines changed

docs/componentsguide/sources/xyz/index.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@ This deviating props are described in the section below.
4747

4848
### Deviating Properties
4949

50-
none.
50+
#### `opaque`
51+
52+
The value for `opaque` is currently set to `true` by default.
53+
However, this behaviour will be aligned with the OpenLayers default of `false` in the future.
54+
55+
See related issue [XYZ source opacity problem #239](https://github.com/MelihAltintas/vue3-openlayers/issues/239).
5156

5257
## Events
5358

src/components/sources/OlSourceOSM.vue

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const props = withDefaults(defineProps<Options>(), {
1818
crossOrigin: "anonymous",
1919
interpolate: true,
2020
maxZoom: 19,
21+
opaque: true,
2122
reprojectionErrorThreshold: 0.5,
2223
transition: 250,
2324
url: "https://tile.openstreetmap.org/{z}/{x}/{y}.png",

src/components/sources/OlSourceOsm.vue

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const props = withDefaults(defineProps<Options>(), {
1818
crossOrigin: "anonymous",
1919
interpolate: true,
2020
maxZoom: 19,
21+
opaque: true,
2122
reprojectionErrorThreshold: 0.5,
2223
transition: 250,
2324
url: "https://tile.openstreetmap.org/{z}/{x}/{y}.png",

src/components/sources/OlSourceXYZ.vue

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ defineOptions({
1818
const props = withDefaults(defineProps<Options>(), {
1919
attributionsCollapsible: true,
2020
interpolate: true,
21+
opaque: true,
2122
maxZoom: 42,
2223
minZoom: 0,
2324
projection: "EPSG:3857",

src/components/sources/OlSourceXyz.vue

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ defineOptions({
1818
const props = withDefaults(defineProps<Options>(), {
1919
attributionsCollapsible: true,
2020
interpolate: true,
21+
opaque: true,
2122
maxZoom: 42,
2223
minZoom: 0,
2324
projection: "EPSG:3857",

src/components/sources/TiandituClass.ts

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export type Options = WMTSOptions & {
99
tk?: string;
1010
isLabel?: boolean;
1111
maxZoom?: number;
12+
opaque?: boolean;
1213
};
1314
export class Tianditu extends WMTSSource {
1415
static layerLabelMap: Record<string, string> = {};
@@ -60,6 +61,7 @@ export class Tianditu extends WMTSSource {
6061
style: options.style || "default",
6162
cacheSize: options.cacheSize,
6263
crossOrigin,
64+
opaque: options.opaque === undefined ? true : options.opaque,
6365
maxZoom: Tianditu.layerZoomMap[options.layerType],
6466
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
6567
url: options.url,

0 commit comments

Comments
 (0)