Decouple TimeControl and TimeUi and refactor the codebase to be more modular#108
Open
sandesh-sp wants to merge 9 commits into
Open
Decouple TimeControl and TimeUi and refactor the codebase to be more modular#108sandesh-sp wants to merge 9 commits into
sandesh-sp wants to merge 9 commits into
Conversation
…mpiles full url replacing time field along with COG options
…g proper re-rendering
sandesh-sp
commented
Jun 2, 2026
Collaborator
Author
There was a problem hiding this comment.
moved this function to tileUrlUtils.ts
slesaad
reviewed
Jun 8, 2026
| // Subscribe to user-initiated time changes from UI elements via Event Bus | ||
| // and emit controlReady event for UI elements to initialize | ||
| if (window.mmgisAPI) { | ||
| const cleanup = window.mmgisAPI.on('time:userChanged', ({ startTime, endTime, currentTime }) => { |
Member
There was a problem hiding this comment.
why time:userChanged ? can it be just time:updated or something similar
Comment on lines
+350
to
+360
| // TODO: Refactor this to push URL compilation and refreshing into the map engine adapters | ||
| // so that TimeControl.js doesn't need to check Map_.engine.engineType === 'deckgl' | ||
| // or rely on tileLayer.refresh(). | ||
| if (tileLayer && typeof tileLayer.refresh === 'function') { | ||
| // Pass deckOptions to refresh so it updates this.options with new COG fields | ||
| tileLayer.refresh(resolvedUrl, true, deckOptions) | ||
| } else if (Map_.engine?.engineType === 'deckgl') { | ||
| const newUrl = compileTileUrl(resolvedUrl, deckOptions) | ||
| Map_.engine.updateLayer(layer.name, { url: newUrl }) | ||
| return true | ||
| } |
Member
There was a problem hiding this comment.
either make an issue for this TODO or fix it in the 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.
This PR introduces architectural refactoring of the TimeControl system, decoupling it from TimeUI through event-based communication.
Key Changes