-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use styleDiff to apply setStyle changes incrementally
Previously, calls to map.setStyle() created a new Style instance. Creating a new Style instance is an expensive operation that abandons the current layers and sources. For simple updates, this is very wasteful. Instead of creating a Style object for every call of map.setStyle() we now diff the new style with the current style and apply the delta within a batch update. Situations where the non-incremental setStyle is used: - initial style for a map - the new stylesheet is already a Style instance - the current style is not done loading - the style diff cannot be applied incrementally Issue: #1341
- Loading branch information
Showing
2 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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