layerchart 0.55.0 → 0.56.0
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.
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
maxValue?: typeof maxValue;
|
|
25
25
|
outerRadius?: typeof outerRadius;
|
|
26
26
|
padAngle?: typeof padAngle;
|
|
27
|
+
center?: typeof center;
|
|
27
28
|
props?: typeof props;
|
|
28
29
|
range?: typeof range;
|
|
29
30
|
series?: typeof series;
|
|
@@ -83,6 +84,9 @@
|
|
|
83
84
|
export let cornerRadius = 0;
|
|
84
85
|
export let padAngle = 0;
|
|
85
86
|
|
|
87
|
+
/** Center chart. Override and use `props.group` for more control */
|
|
88
|
+
export let center = true;
|
|
89
|
+
|
|
86
90
|
export let props: {
|
|
87
91
|
pie?: Partial<ComponentProps<Pie>>;
|
|
88
92
|
group?: Partial<ComponentProps<Group>>;
|
|
@@ -143,7 +147,7 @@
|
|
|
143
147
|
tooltip,
|
|
144
148
|
}}
|
|
145
149
|
<slot {...slotProps}>
|
|
146
|
-
<Svg center>
|
|
150
|
+
<Svg {center}>
|
|
147
151
|
<slot name="belowMarks" {...slotProps} />
|
|
148
152
|
|
|
149
153
|
<slot name="marks" {...slotProps}>
|
|
@@ -222,6 +222,7 @@ declare class __sveltets_Render<TData> {
|
|
|
222
222
|
maxValue?: number | undefined;
|
|
223
223
|
outerRadius?: number | undefined;
|
|
224
224
|
padAngle?: number;
|
|
225
|
+
center?: boolean;
|
|
225
226
|
props?: {
|
|
226
227
|
pie?: Partial<ComponentProps<Pie>>;
|
|
227
228
|
group?: Partial<ComponentProps<Group>>;
|
|
@@ -39,6 +39,21 @@
|
|
|
39
39
|
// https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_v2/VectorTileServer/tile/12/1572/1108.pbf
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
+
// https://github.com/leaflet-extras/leaflet-providers/blob/master/leaflet-providers.js#L79
|
|
43
|
+
// https://www.openstreetmap.org/
|
|
44
|
+
const openStreetMap = (tileset: string) => (x: number, y: number, z: number) => {
|
|
45
|
+
// CyclOSM: https://a.tile-cyclosm.openstreetmap.fr/cyclosm/9/142/197.png
|
|
46
|
+
// Cycle Map: https://b.tile.thunderforest.com/cycle/9/141/199@2x.png?apikey=6e5478c8a4f54c779f85573c0e399391
|
|
47
|
+
// TransportMap: https://b.tile.thunderforest.com/transport/9/136/195@2x.png?apikey=6e5478c8a4f54c779f85573c0e399391
|
|
48
|
+
return `https://tile.openstreetmap.org/${z}/${x}/${y}.png`;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
// opentopomap.org/
|
|
52
|
+
const openTopoMap = (tileset: string) => (x: number, y: number, z: number) => {
|
|
53
|
+
const s = 'a';
|
|
54
|
+
return `https://${s}.tile.opentopomap.org/${z}/${x}/${y}.png`;
|
|
55
|
+
};
|
|
56
|
+
|
|
42
57
|
$: services = {
|
|
43
58
|
'mapbox v1': {
|
|
44
59
|
'streets-v11': mapboxv1('streets-v11'),
|
|
@@ -59,6 +74,12 @@
|
|
|
59
74
|
traffic: mapboxv4('mapbox.mapbox-traffic-v1'),
|
|
60
75
|
// 'transit (mapbox v4)': mapboxv4('mapbox.transit-v2'),
|
|
61
76
|
},
|
|
77
|
+
OpenStreetMap: {
|
|
78
|
+
Stardard: openStreetMap(''),
|
|
79
|
+
},
|
|
80
|
+
OpenTopoMap: {
|
|
81
|
+
Stardard: openTopoMap(''),
|
|
82
|
+
},
|
|
62
83
|
'National Map Services': {
|
|
63
84
|
Hydrography: nationalmap('USGSHydroCached'),
|
|
64
85
|
'USGS Imagery Topo Base Map': nationalmap('USGSImageryTopo'),
|