@tileflow/svelte 0.1.0-alpha.31 → 0.1.0-alpha.33
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/README.md +8 -4
- package/package.json +3 -3
- package/src/TileflowMap.svelte +8 -0
package/README.md
CHANGED
|
@@ -96,7 +96,8 @@ Maps without this capability ignore the option; omitting it keeps the selected t
|
|
|
96
96
|
Changing it uses the existing theme transition. `themeBlend` takes precedence. See the
|
|
97
97
|
[authoring contract](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/README.md#style-with-themes-and-semantic-modules).
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
Theme and `timeOfDay` changes cross-fade over 450 ms by default, respecting reduced motion.
|
|
100
|
+
`themeTransition={{duration: 700}}` customizes the duration; use `duration: 0` for an immediate change.
|
|
100
101
|
`themeBlend={{themes: ['night', 'dusk', 'day'], position}}` shows a continuous blend of the map's
|
|
101
102
|
themes instead of `theme`: position 0 is the first theme and 1.5 is halfway from the second to the
|
|
102
103
|
third. Moving the position updates the map at once. See
|
|
@@ -117,9 +118,12 @@ and [vegetation controls](https://github.com/tileflow/tileflow-sdk/blob/main/pac
|
|
|
117
118
|
those options, then the manifest view, then shared defaults. `TileflowMap` always selects a Tileflow
|
|
118
119
|
map through its manifest; it has no renderer discriminator or direct-style mode. Tileflow's styles
|
|
119
120
|
are validated when they are compiled, so `validateStyle` defaults to `false`; pass `true` to
|
|
120
|
-
validate them again in the browser.
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
validate them again in the browser.
|
|
122
|
+
The map canvas is multisampled by default (`canvasContextAttributes.antialias` is `true`) so the
|
|
123
|
+
thin edges of 3D models stay continuous; other context attributes you pass are kept, and
|
|
124
|
+
`canvasContextAttributes: {antialias: false}` trades that smoothing for lower GPU cost.
|
|
125
|
+
The obsolete source fields `kind` and `style` are rejected. For a completely unmanaged map, use
|
|
126
|
+
`maplibre-gl` directly rather than a Tileflow component.
|
|
123
127
|
|
|
124
128
|
## Add annotations and native popup UI
|
|
125
129
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tileflow/svelte",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.33",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Svelte component for rendering Tileflow maps with MapLibre.",
|
|
6
6
|
"type": "module",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@tileflow/core": ">=0.1.0-alpha.
|
|
47
|
+
"@tileflow/core": ">=0.1.0-alpha.40 <0.1.0-beta.0",
|
|
48
48
|
"@tileflow/interactions": ">=0.1.0-alpha.6 <0.1.0-beta.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"maplibre-gl": "6.13.0",
|
|
56
56
|
"svelte": "^5.57.2",
|
|
57
|
-
"svelte-check": "^4.
|
|
57
|
+
"svelte-check": "^4.7.7"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"build": "svelte-check --tsconfig ./tsconfig.json",
|
package/src/TileflowMap.svelte
CHANGED
|
@@ -30,9 +30,11 @@
|
|
|
30
30
|
} from '@tileflow/core/runtime';
|
|
31
31
|
import {
|
|
32
32
|
attachTileflowAtmosphere,
|
|
33
|
+
attachTileflowLabelPlacement,
|
|
33
34
|
attachTileflowFairUseNotice,
|
|
34
35
|
attachTileflowMap3D,
|
|
35
36
|
attachTileflowMapLifecycle,
|
|
37
|
+
attachTileflowNauticalLights,
|
|
36
38
|
attachTileflowNotices,
|
|
37
39
|
createTileflowSessionStarter,
|
|
38
40
|
createTileflowThemeController,
|
|
@@ -44,6 +46,8 @@
|
|
|
44
46
|
registerTileflowPmtilesProtocol,
|
|
45
47
|
registerTileflowWorldRequestBridge,
|
|
46
48
|
subscribeTileflowSystemColorScheme,
|
|
49
|
+
tileflowMaxPitch,
|
|
50
|
+
tileflowCanvasContextAttributes,
|
|
47
51
|
type TileflowFairUseNoticeController,
|
|
48
52
|
type TileflowMapLifecycleAttachment,
|
|
49
53
|
type TileflowThemeController,
|
|
@@ -586,9 +590,11 @@
|
|
|
586
590
|
});
|
|
587
591
|
const maplibreMap = new maplibregl.Map({
|
|
588
592
|
...mapOptions,
|
|
593
|
+
canvasContextAttributes: tileflowCanvasContextAttributes(mapOptions?.canvasContextAttributes),
|
|
589
594
|
attributionControl: mapOptions?.attributionControl ?? {compact: true},
|
|
590
595
|
// Tileflow's compiled styles are validated when they are built.
|
|
591
596
|
validateStyle: mapOptions?.validateStyle ?? false,
|
|
597
|
+
maxPitch: mapOptions?.maxPitch ?? tileflowMaxPitch,
|
|
592
598
|
bearing: resolvedBearing,
|
|
593
599
|
center: resolvedCenter as LngLatLike,
|
|
594
600
|
container: targetContainer,
|
|
@@ -608,6 +614,8 @@
|
|
|
608
614
|
mapInstance = maplibreMap;
|
|
609
615
|
attachTileflowAtmosphere(maplibreMap);
|
|
610
616
|
attachTileflowNotices(maplibreMap);
|
|
617
|
+
attachTileflowNauticalLights(maplibreMap);
|
|
618
|
+
attachTileflowLabelPlacement(maplibreMap);
|
|
611
619
|
themeController =
|
|
612
620
|
runtime.theme === undefined
|
|
613
621
|
? null
|