-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Efficiently apply style changes by diff-ing new and old styles (i.e. smartSetStyle) #1989
Comments
@averas also suggested the inclusion of a |
Eh, I'm mildly -1 on |
@jfirebaugh Could you review our last 4 posts in #1982 and comment? This basically stems from the desire to apply a new style without losing all existing sources, especially the expensive ones (large GeoJSON objects). |
I hadn't actually noticed the batch API, and it looks quite neat to make batch changes to the style without replacing the entire style. Still however, if a smart |
I am +1 for |
I'm envisioning this feature as a unification of the current style mutation batching system and the cc @tmcw |
Ambitious proposal for implementing this, going the opposite direction from "API as a set of orthogonal individual mutators": Extract a pure, low-level component whose only mutator is a React-style
Internally, the component will need to maintain loaded data (such as tiles) and derived state (such as buffers and computed refs). To allow efficient, maximal reuse of this data and efficient, minimal recomputation of derived state, the component would require that the object passed to Provide additional modules for:
Provide a traditional |
I'm strongly in favor of a React-like declarative |
Haven't thought this all the way through, but this might also provide a nice little boost for updating worker layer info by sending just the diff over the channel |
Implemented in #3621! |
Continuing from #1341 now that constants have been eliminated from the style spec (per #1348 (comment)).
The text was updated successfully, but these errors were encountered: