Emit feature:click on the bus for every vector feature click - #292
Open
BhattaraiSijan wants to merge 8 commits into
Open
Emit feature:click on the bus for every vector feature click#292BhattaraiSijan wants to merge 8 commits into
BhattaraiSijan wants to merge 8 commits into
Conversation
This was referenced Aug 10, 2026
Collaborator
Author
|
Addressed the review findings on this PR:
|
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.
Summary
Adds a single generic bus event,
feature:click— fired for every click on a vector feature, on any layer type (classic GeoJSON, vector tile, engine-adapter) and either engine. Payload:{ feature, layerName (uuid), latlng, pixel }.Unlike
feature:activeit carries no selection semantics and stays independent of the legacy Kinds/Info flow. Unlikemap:featureClickit never fires for empty-space clicks and covers mission-config layers, not just adapter-created ones. All three click pipelines inMap_.jsfunnel into one emit function, so the name and payload are defined in exactly one place.Documented in the Event-Bus API page. First consumer is the FetchTimeseries plugin (see merge order below).
Known edge
A single physical click on a classic mission feature that also sits over an adapter-created layer emits two
feature:clickevents (one per pipeline, differentlayerNames). Contained in practice — consumers filter by layer — but worth knowing when debugging.Merge order
developmentTesting
Manual:
window.mmgisAPI.on('feature:click', console.log)then click features on a Leaflet-classic mission layer, a vectortile layer, and a deck.gl GeoJsonLayer — one event each, identical shape. Full unit suite green (1040).