@3clear/basegis 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/layers.js CHANGED
@@ -1,94 +1,103 @@
1
- function m(t = {}) {
1
+ import { c, g as l, a as y } from "./basemap.config-Bs1PwVYt.js";
2
+ function v(i = {}) {
2
3
  const {
3
- id: i = "tianditu-layer",
4
- name: a = "Tianditu Layer",
4
+ id: r = "tianditu-layer",
5
+ name: t = "Tianditu Layer",
5
6
  visible: e = !0,
6
- provider: r = "tianditu",
7
- type: s = "wmts",
8
- ...n
9
- } = t;
7
+ provider: a = "tianditu",
8
+ type: n = "wmts",
9
+ ...s
10
+ } = i;
10
11
  return {
11
- ...n,
12
- id: i,
13
- name: a,
14
- provider: r,
15
- type: s,
12
+ ...s,
13
+ id: r,
14
+ name: t,
15
+ provider: a,
16
+ type: n,
16
17
  visible: e
17
18
  };
18
19
  }
19
- function c(t = {}) {
20
+ function b(i = "imagery") {
21
+ const r = c("tianditu"), t = l("tianditu"), e = y(i);
22
+ return !r || !t || !e ? null : {
23
+ url: e.replace("{subdomain}", "{s}").replace("{tk}", encodeURIComponent(t)),
24
+ subdomains: [...r.subdomains || ["0"]]
25
+ };
26
+ }
27
+ function L(i = {}) {
20
28
  const {
21
- id: i = "geoserver-pyramid-layer",
22
- name: a = "GeoServer Pyramid Layer",
29
+ id: r = "geoserver-pyramid-layer",
30
+ name: t = "GeoServer Pyramid Layer",
23
31
  url: e = "",
24
- visible: r = !0,
25
- provider: s = "geoserver",
26
- type: n = "xyz",
27
- ...u
28
- } = t;
32
+ visible: a = !0,
33
+ provider: n = "geoserver",
34
+ type: s = "xyz",
35
+ ...o
36
+ } = i;
29
37
  return {
30
- ...u,
31
- id: i,
32
- name: a,
33
- provider: s,
34
- type: n,
38
+ ...o,
39
+ id: r,
40
+ name: t,
41
+ provider: n,
42
+ type: s,
35
43
  url: e,
36
- visible: r
44
+ visible: a
37
45
  };
38
46
  }
39
- function d(t = {}) {
47
+ function f(i = {}) {
40
48
  const {
41
- id: i = "wms-layer",
42
- name: a = "WMS Layer",
49
+ id: r = "wms-layer",
50
+ name: t = "WMS Layer",
43
51
  url: e = "",
44
- serviceUrl: r = "",
45
- layers: s = "",
46
- parameters: n = {},
47
- visible: u = !0,
48
- provider: y = "custom",
49
- type: o = "wms",
50
- ...l
51
- } = t;
52
+ serviceUrl: a = "",
53
+ layers: n = "",
54
+ parameters: s = {},
55
+ visible: o = !0,
56
+ provider: u = "custom",
57
+ type: d = "wms",
58
+ ...m
59
+ } = i;
52
60
  return {
53
- ...l,
54
- id: i,
55
- name: a,
56
- provider: y,
57
- type: o,
58
- url: e || r,
59
- serviceUrl: r || e,
60
- visible: u,
61
- layers: s,
62
- parameters: n
61
+ ...m,
62
+ id: r,
63
+ name: t,
64
+ provider: u,
65
+ type: d,
66
+ url: e || a,
67
+ serviceUrl: a || e,
68
+ visible: o,
69
+ layers: n,
70
+ parameters: s
63
71
  };
64
72
  }
65
- function v(t = {}) {
73
+ function T(i = {}) {
66
74
  const {
67
- id: i = "wmts-layer",
68
- name: a = "WMTS Layer",
75
+ id: r = "wmts-layer",
76
+ name: t = "WMTS Layer",
69
77
  url: e = "",
70
- layer: r = "",
71
- tileMatrixSet: s = "",
72
- visible: n = !0,
73
- provider: u = "custom",
74
- type: y = "wmts",
75
- ...o
76
- } = t;
78
+ layer: a = "",
79
+ tileMatrixSet: n = "",
80
+ visible: s = !0,
81
+ provider: o = "custom",
82
+ type: u = "wmts",
83
+ ...d
84
+ } = i;
77
85
  return {
78
- ...o,
79
- id: i,
80
- name: a,
81
- provider: u,
82
- type: y,
86
+ ...d,
87
+ id: r,
88
+ name: t,
89
+ provider: o,
90
+ type: u,
83
91
  url: e,
84
- visible: n,
85
- layer: r,
86
- tileMatrixSet: s
92
+ visible: s,
93
+ layer: a,
94
+ tileMatrixSet: n
87
95
  };
88
96
  }
89
97
  export {
90
- c as createGeoserverPyramidLayer,
91
- m as createTiandituLayer,
92
- d as createWmsLayer,
93
- v as createWmtsLayer
98
+ L as createGeoserverPyramidLayer,
99
+ v as createTiandituLayer,
100
+ b as createTiandituTileSource,
101
+ f as createWmsLayer,
102
+ T as createWmtsLayer
94
103
  };