@sjvair/monitor-map 3.6.1 → 3.6.2
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.
|
@@ -42,7 +42,15 @@ export const initializeMap = (container) => {
|
|
|
42
42
|
preset: "milkyway"
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
|
-
|
|
45
|
+
// "load" fires once the style and initial viewport tiles have loaded --
|
|
46
|
+
// in practice this can hang indefinitely (observed: never fires, even
|
|
47
|
+
// after 20+s, despite the style/tiles being independently fetchable) for
|
|
48
|
+
// reasons that don't affect "idle", which fires once the map has
|
|
49
|
+
// finished rendering after becoming idle. MapShell's own effect no
|
|
50
|
+
// longer waits for a *second* idle event to hide the load screen (see
|
|
51
|
+
// its comment), so listening for "idle" here doesn't reintroduce the
|
|
52
|
+
// hang that change was fixing.
|
|
53
|
+
map.once("idle", () => {
|
|
46
54
|
mapManager.map = map;
|
|
47
55
|
});
|
|
48
56
|
return () => map.remove();
|
package/package.json
CHANGED
|
@@ -61,7 +61,15 @@ export const initializeMap: Attachment<HTMLDivElement> = (container: string | HT
|
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
// "load" fires once the style and initial viewport tiles have loaded --
|
|
65
|
+
// in practice this can hang indefinitely (observed: never fires, even
|
|
66
|
+
// after 20+s, despite the style/tiles being independently fetchable) for
|
|
67
|
+
// reasons that don't affect "idle", which fires once the map has
|
|
68
|
+
// finished rendering after becoming idle. MapShell's own effect no
|
|
69
|
+
// longer waits for a *second* idle event to hide the load screen (see
|
|
70
|
+
// its comment), so listening for "idle" here doesn't reintroduce the
|
|
71
|
+
// hang that change was fixing.
|
|
72
|
+
map.once("idle", () => {
|
|
65
73
|
mapManager.map = map;
|
|
66
74
|
});
|
|
67
75
|
|