-
-
Notifications
You must be signed in to change notification settings - Fork 868
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This new event is triggered when the map's non-rotated size is changed, it is not called when the map is initialized. This will fix TileLayer not loading new tiles when the map size changes. In passing I made some other improvements: - Expose nonRotatedSize’s full type (CustomPoint<double>? instead of CustomPoint?) to avoid unnecessary type casts. - Improve the check for the constraints being ready before setting initial zoom/center based on MapOptions bounds. - Remove unnecessary setState in FlutterMapState’s emitMapEvent. The event emitting does not change the map's state and was causing double calls to setState in some code paths. - FlutterMapState tidy ups. - Removed the workaround for the initial map size being zero in TileLayer which caused tiles to not be loaded. The new MapEventNonRotatedSizeChange event removes the need for this workaround as during startup either: - The platform has already set flutter's resolution and thus all tiles are successfully loaded. - The platform has not set flutter's resolution but when it does it will cause LayoutBuilder to rebuild with the new size which will trigger a MapEventNonRotatedSizeChange event. This event will in turn trigger a tile load in TileLayer.
- Loading branch information
1 parent
84b0029
commit 97586a1
Showing
4 changed files
with
166 additions
and
172 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
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
Oops, something went wrong.