Repository navigation
Add onAddStart/onAddProgress/onAddEnd to Markers, Circles, Polylines, Polygons - #16
Merged
Merged
Conversation
… Polygons A list of thousands shows nothing until it is drawn; these say the work is going on. They count the states a list brings by the same moment as each state's onAdded, report progress at most every 100 ms, and start over when a new list adds states. The same as the js-sdk-react collections.
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.
These callbacks show that a long list is being put on the map. They mean the same as in js-sdk-react (MapConductor/js-sdk-react#17):
onAddStart(total): the list brings states the map does not have yet.onAddProgress(added, total): at most every 100 ms, and once more atadded == total.onAddEnd(total): all of them are on the map. This is the same moment as theironAdded; for tiled states, that is when their tiles were handed to the map.The diff runs on
Dispatchers.Defaultas before.track()now runs on the main thread just before the collector update, so that no arrival comes ahead of it.OverlayAddedListeners. Standalone CI clones core's develop, so it fails until that PR is merged.Tests:
AddProgressTrackerTest, the same cases as the React test. Device: on the antenna-horizons page (723,800 circles, MapLibre, tablet HA26Z6JL),start 723800came at 2.3 s; all of them arrived at 11.1 s, followed byprogress 723800/723800andend.