@tileflow/vue 0.1.0-alpha.30 → 0.1.0-alpha.31
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 +12 -6
- package/dist/index.js +15 -11
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -100,16 +100,22 @@ map's themes instead of `theme`: position 0 is the first theme and 1.5 is halfwa
|
|
|
100
100
|
the third. Moving the position updates the map at once. See
|
|
101
101
|
[theme transitions and blends](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/theme-transitions-and-blends.md).
|
|
102
102
|
|
|
103
|
-
Interactive maps
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
Interactive maps show the 3D scene their style declares by default: buildings with Tileflow
|
|
104
|
+
landmarks and the map's Team building models, 3D trees, and street lights where the map enables
|
|
105
|
+
them. The 3D renderers load only when the style declares a scene, so 2D maps do not download them.
|
|
106
|
+
`viewMode` is `3d` by default; `view-mode="2d"` opts out, mounting no 3D buildings or street lights, and
|
|
107
|
+
draws vegetation as the map's policy sets for the 2D view (Streets keeps its model trees in either
|
|
108
|
+
view). `vegetation` overrides vegetation visibility (omitting it uses the map default); `:vegetation="false"`
|
|
109
|
+
hides models and flat artwork alike. Changing either prop updates the existing map immediately.
|
|
110
|
+
They do not change camera pitch and do not apply in image mode. See
|
|
111
|
+
[the map's 3D scene](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/buildings-3d.md#the-maps-3d-scene)
|
|
112
|
+
and [vegetation controls](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/trees-3d.md#visibility-and-representation).
|
|
109
113
|
|
|
110
114
|
`mapOptions` accepts native MapLibre options except `container` and `style`. Direct props take
|
|
111
115
|
priority over those options, then the published view, then shared defaults. `TileflowMap` always
|
|
112
116
|
selects a Tileflow map through its manifest; it has no renderer discriminator or direct-style mode.
|
|
117
|
+
Tileflow's styles are validated when they are compiled, so `validateStyle` defaults to `false`; pass
|
|
118
|
+
`true` to validate them again in the browser.
|
|
113
119
|
The obsolete source fields `kind` and `style` are rejected. For a completely unmanaged map, use
|
|
114
120
|
`maplibre-gl` directly rather than a Tileflow component.
|
|
115
121
|
|
package/dist/index.js
CHANGED
|
@@ -16,11 +16,11 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
attachTileflowAtmosphere,
|
|
18
18
|
attachTileflowFairUseNotice,
|
|
19
|
+
attachTileflowMap3D,
|
|
19
20
|
attachTileflowMapLifecycle,
|
|
20
21
|
attachTileflowNotices,
|
|
21
22
|
createTileflowSessionStarter,
|
|
22
23
|
createTileflowThemeController,
|
|
23
|
-
createTileflowVegetation,
|
|
24
24
|
createTileflowTransformRequest,
|
|
25
25
|
getTileflowSystemColorScheme,
|
|
26
26
|
loadTileflowStyleFonts,
|
|
@@ -245,7 +245,7 @@ var TileflowMap = defineComponent({
|
|
|
245
245
|
type: Object
|
|
246
246
|
},
|
|
247
247
|
vegetation: { type: Boolean, default: void 0 },
|
|
248
|
-
viewMode: { type: String, default: "
|
|
248
|
+
viewMode: { type: String, default: "3d" },
|
|
249
249
|
theme: String,
|
|
250
250
|
timeOfDay: String,
|
|
251
251
|
themeBlend: Object,
|
|
@@ -297,7 +297,7 @@ var TileflowMap = defineComponent({
|
|
|
297
297
|
let mapLifecycle = null;
|
|
298
298
|
let mapResizeObserver = null;
|
|
299
299
|
let mapWorldRequestBridge = null;
|
|
300
|
-
let
|
|
300
|
+
let sceneAttachment = null;
|
|
301
301
|
let themeController = null;
|
|
302
302
|
let unsubscribeSystemColorScheme = null;
|
|
303
303
|
let mapLoadId = 0;
|
|
@@ -631,8 +631,8 @@ var TileflowMap = defineComponent({
|
|
|
631
631
|
watch(
|
|
632
632
|
() => [props.vegetation, props.viewMode],
|
|
633
633
|
([visible, viewMode]) => {
|
|
634
|
-
|
|
635
|
-
|
|
634
|
+
sceneAttachment?.setVegetation(visible);
|
|
635
|
+
sceneAttachment?.setViewMode(viewMode ?? "3d");
|
|
636
636
|
}
|
|
637
637
|
);
|
|
638
638
|
const destroyMap = () => {
|
|
@@ -644,8 +644,8 @@ var TileflowMap = defineComponent({
|
|
|
644
644
|
const resizeObserver = mapResizeObserver;
|
|
645
645
|
const map = mapRef.value;
|
|
646
646
|
const controller = themeController;
|
|
647
|
-
const
|
|
648
|
-
|
|
647
|
+
const scene = sceneAttachment;
|
|
648
|
+
sceneAttachment = null;
|
|
649
649
|
const annotationInteractionsForMap = annotationRuntime;
|
|
650
650
|
const semanticInteractionsForMap = semanticRuntime;
|
|
651
651
|
const worldRequestBridge = mapWorldRequestBridge;
|
|
@@ -663,7 +663,7 @@ var TileflowMap = defineComponent({
|
|
|
663
663
|
() => worldRequestBridge?.dispose(),
|
|
664
664
|
() => fairUseNotice?.dispose(),
|
|
665
665
|
() => lifecycle?.dispose(),
|
|
666
|
-
() =>
|
|
666
|
+
() => scene?.dispose(),
|
|
667
667
|
() => controller?.dispose(),
|
|
668
668
|
() => resizeObserver?.disconnect(),
|
|
669
669
|
() => map?.remove()
|
|
@@ -797,6 +797,8 @@ var TileflowMap = defineComponent({
|
|
|
797
797
|
attributionControl: props.mapOptions?.attributionControl ?? {
|
|
798
798
|
compact: true
|
|
799
799
|
},
|
|
800
|
+
// Tileflow's compiled styles are validated when they are built.
|
|
801
|
+
validateStyle: props.mapOptions?.validateStyle ?? false,
|
|
800
802
|
bearing: resolvedBearing.value,
|
|
801
803
|
center: resolvedCenter.value,
|
|
802
804
|
container,
|
|
@@ -829,11 +831,13 @@ var TileflowMap = defineComponent({
|
|
|
829
831
|
}
|
|
830
832
|
}
|
|
831
833
|
});
|
|
832
|
-
|
|
834
|
+
sceneAttachment = attachTileflowMap3D({
|
|
833
835
|
map,
|
|
834
836
|
...themeController ? { controller: themeController } : {},
|
|
835
|
-
|
|
836
|
-
viewMode: props.viewMode ?? "
|
|
837
|
+
vegetation: props.vegetation,
|
|
838
|
+
viewMode: props.viewMode ?? "3d",
|
|
839
|
+
load: () => import("@tileflow/core/3d"),
|
|
840
|
+
onError: (error) => console.error("Failed to load the Tileflow 3D scene", error),
|
|
837
841
|
transformRequest: createTileflowTransformRequest({
|
|
838
842
|
getAnalytics: () => resolvedAnalytics.value,
|
|
839
843
|
sessionController: session,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tileflow/vue",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.31",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Vue component for rendering Tileflow maps with MapLibre.",
|
|
6
6
|
"type": "module",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@tileflow/core": ">=0.1.0-alpha.
|
|
42
|
-
"@tileflow/interactions": ">=0.1.0-alpha.
|
|
41
|
+
"@tileflow/core": ">=0.1.0-alpha.38 <0.1.0-beta.0",
|
|
42
|
+
"@tileflow/interactions": ">=0.1.0-alpha.6 <0.1.0-beta.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"maplibre-gl": ">=6.4.1 <7",
|