Add compare-layer and add-layer-from-URL entry points to the Layer Manager - #335
Open
sandesh-sp wants to merge 2 commits into
Open
Add compare-layer and add-layer-from-URL entry points to the Layer Manager#335sandesh-sp wants to merge 2 commits into
sandesh-sp wants to merge 2 commits into
Conversation
Each layer's three-dots menu offers "Compare layer", which hands that layer to the Comparison plugin as the first of the two sides it reads against each other. The hand-off is announced on the mmgisAPI bus rather than called directly: the layers list knows nothing about Comparison beyond the name of the event, and a mission without that plugin simply has nobody listening.
BhattaraiSijan
approved these changes
Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two additions to the Layer Manager panel, both wired to other plugins over the mmgisAPI bus rather than through direct imports.
Compare layer
Each layer's three-dots menu gains a Compare layer entry. Choosing it hands that layer to the Comparison plugin as the first of the two sides it reads against each other. The hand-off is announced as a bus event, so the layers list knows nothing about Comparison beyond the event name, and a mission without that plugin simply has nobody listening.
Add layer from URL
A button above the layer list reveals the AddTempLayer plugin's "add layer from URL" form. AddTempLayer is configured
startHiddenand ships no trigger of its own, so something else has to reveal it; the button emitscore:showPluginto have the layout unhide the panel, alongside the plugin's own documentedaddTempLayer:showevent for layouts that do not dispatch core commands. Both are inert in a mission without AddTempLayer, and the button itself is omitted whenever the host passes no handler — the portableLayerManagerPanelowns no form of its own.AddTempLayer's manifest also drops its
compatiblePositionslist. The runtime reads placement metadata only from the mission config's tool entry, and a stale left/right list there caused the explicit assignment to thefloat-top-rightpanel to be rejected as incompatible, dropping the tool into the first left panel instead. With no position constraint declared, it is compatible with any panel andpreferredPosition: "float-top-right"still steers the fallback.Testing
npx vitest run src/essence/Tools/LayerManager/__tests__/— 106 passing, including new cases covering the compare hand-off, the add-layer callback, and the button's absence without a handler.tsc --noEmitis clean.