-
-
Notifications
You must be signed in to change notification settings - Fork 863
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow polylines & polygons to cross world boundary (#1969)
* fix: 1338 - longitude +-180 with correct polylines and polygons Impacted files * `crs.dart`: new methods `getHalfWorldWidth` and `projectList` * `painter.dart`: refactored using pre-computed `List<Double>` * `polygon.dart`: added an example around longitude 180 * `polyline.dart`: added an example around longitude 180 * `polyline_layer.dart`: we don't cull polylines that go beyond longitude 180 * `projected_polygon.dart`: using new method `Projection.projectList` * `projected_polyline.dart`: using new method `Projection.projectList` * Typo fix. * fix: always display at least one instance of the polyline/polygon Impacted files: * `offsets.dart`: new method `getAddedWorldWidth`, used to add/subtract a world width in order to display visible polylines * `painter.dart`: minor fix, as now we may unproject coordinates from the wrong world * refactoring Impacted files: * `crs.dart`: replaced "half world width" with "world width", in order to avoid answering to the question "why HALF?" * `offsets.dart`: now we display the occurrence closer to the screen center; minor refactoring * `painter.dart`: minor fix regarding side-effects on `_metersToStrokeWidth` * `polyline_layer.dart`: now computes the limits projected from -180 and 180 instead of "half world width" * `projected_polyline.dart`: moved code to `polyline_layer.dart` * "example" build fix * "example" build fix, just trying * "example" build fix, just trying * minor fix
- Loading branch information
1 parent
aca8aed
commit b81d6db
Showing
9 changed files
with
181 additions
and
68 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
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
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