feat(app): a host names the layers a bare address starts with

createApplicationControls takes startLayers, the layer ids that turn on when
the address carries no link (none by default). They restore through the
passive start-up path, so they are never written as the user's own choice, and
a link's own layers always win.
This commit is contained in:
Sameh Khamis committed 2026-11-19 14:19:45 -08:00
1 parent e02f6c6e39
commit ca98ed1919
6 files changed
+66 -1

No files matched your search

+4
View File
@@ -117,6 +117,8 @@ export class StyleManager extends ShellFacade {
* @param {{lon: number, lat: number, height: number, heading?: number,
* pitch?: number}|null} [options.homeView] - where the title's logo goes
* back to (degrees): the view the app started from.
* @param {string[]} [options.startLayers] - the layers a bare address (one
* that carries no link) starts with; none by default.
*/
constructor(
viewer,
@@ -128,6 +130,7 @@ export class StyleManager extends ShellFacade {
initialShareCode = null,
localePicker = true,
homeView = null,
startLayers = [],
} = {},
) {
super();
@@ -256,6 +259,7 @@ export class StyleManager extends ShellFacade {
updateFeedback: () => this._updateGlobalLoadingFeedback(),
applyFollowOffset: (followed, offset) =>
applyShareFollowOffset(viewer, followed, offset),
startLayers,
});
this._visualSettings = new VisualSettings({