Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,29 @@ Please consider [donating](https://github.com/sponsors/fleaflet) or [contributin

This CHANGELOG does not include every commit and/or PR - it is a hand picked selection of the ones that have an effect on most users. For a full list of changes, please check the GitHub repository releases/tags. We also release highlights for some releases on the docs site.

## [8.3.1] - 2026/07/xx

Contains the following user-affecting bug fixes:

- Revert [#2182](https://github.com/fleaflet/flutter_map/pull/2182) to fix multiple internal errors - [#2218](https://github.com/fleaflet/flutter_map/pull/2218) for [#2199](https://github.com/fleaflet/flutter_map/issues/2199)
- Prevent memory leak and crash when `Marker`s with NaN coordinates provided - [#2213](https://github.com/fleaflet/flutter_map/pull/2213) for [#2178](https://github.com/fleaflet/flutter_map/issues/2178)

Contains the following user-affecting performance improvements:

- Improve `MarkerLayer` performance by caching projections - [#2213](https://github.com/fleaflet/flutter_map/pull/2213)
- Improve `PolygonLayer` performance, particularly for polygons with holes - [#2211](https://github.com/fleaflet/flutter_map/pull/2211)
- Improve `PolylineLayer` performance by improving culling algorithm - [#2212](https://github.com/fleaflet/flutter_map/pull/2212)

Contains the following other notable changes:

- Support 'pkg:latlong2' v0.10.x dependency - [#2207](https://github.com/fleaflet/flutter_map/pull/2207)

Many thanks to these contributors (in no particular order):

- @ThexXTURBOXx
- @ben-milanko
- ... and all the maintainers

## [8.3.0] - 2026/04/14

Contains the following user-affecting changes:
Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ We rely on a standardized process and procedure to ensure top-quality releases.

* **Use a clear (preferably [Conventional](https://www.conventionalcommits.org/)) PR title.**
This makes it easier for us to group commits for release and write correct CHANGELOGs.

* **Using AI?**
If you're using AI in any way to write code or otherwise assist you, please let us know in the PR description.
If the code is of insufficient quality, it will be rejected. Human submitters take all responsibility for their code.
2 changes: 1 addition & 1 deletion example/lib/misc/tile_providers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ final httpClient = RetryClient(Client());
// TODO: This causes unneccessary rebuilding
TileLayer get openStreetMapTileLayer => TileLayer(
urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
userAgentPackageName: 'dev.fleaflet.flutter_map.example',
userAgentPackageName: 'dev.fleaflet.flutter_map.demo',
tileProvider: NetworkTileProvider(httpClient: httpClient),
);
32 changes: 12 additions & 20 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ packages:
dependency: transitive
description:
name: characters
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
url: "https://pub.dev"
source: hosted
version: "1.4.0"
version: "1.4.1"
clock:
dependency: transitive
description:
Expand Down Expand Up @@ -124,7 +124,7 @@ packages:
path: ".."
relative: true
source: path
version: "8.2.2"
version: "8.3.0"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -207,22 +207,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "6.0.0"
logger:
dependency: transitive
description:
name: logger
sha256: "55d6c23a6c15db14920e037fe7e0dc32e7cdaf3b64b4b25df2d541b5b6b81c0c"
url: "https://pub.dev"
source: hosted
version: "2.6.1"
matcher:
dependency: transitive
description:
name: matcher
sha256: "12956d0ad8390bbcc63ca2e1469c0619946ccb52809807067a7020d57e647aa6"
sha256: "31bd099b47c10cd1aeb55146a2d46ce0277630ecef3f7dae54ad7873f36696cd"
url: "https://pub.dev"
source: hosted
version: "0.12.18"
version: "0.12.20"
material_color_utilities:
dependency: transitive
description:
Expand All @@ -235,10 +227,10 @@ packages:
dependency: transitive
description:
name: meta
sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394"
sha256: c82594181e3312f3d0695fc95aaaf7758d75b8d4ae2bbecf223b9fd5109a059d
url: "https://pub.dev"
source: hosted
version: "1.17.0"
version: "1.18.3"
mgrs_dart:
dependency: transitive
description:
Expand Down Expand Up @@ -456,10 +448,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "19a78f63e83d3a61f00826d09bc2f60e191bf3504183c001262be6ac75589fb8"
sha256: "2a122cbe059f8b610d3a5415f42e255b6c17b1f21eee1d960f31080237fb4f11"
url: "https://pub.dev"
source: hosted
version: "0.7.8"
version: "0.7.12"
typed_data:
dependency: transitive
description:
Expand Down Expand Up @@ -552,10 +544,10 @@ packages:
dependency: transitive
description:
name: vector_math
sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
sha256: "1d774bbdf6b72a0b12122fc1560c9c2d2a67db5a4a4cc2bd8a5c990ab20e3188"
url: "https://pub.dev"
source: hosted
version: "2.2.0"
version: "2.4.0"
vm_service:
dependency: transitive
description:
Expand Down Expand Up @@ -589,5 +581,5 @@ packages:
source: hosted
version: "1.1.0"
sdks:
dart: ">=3.9.0 <4.0.0"
dart: ">=3.10.0 <4.0.0"
flutter: ">=3.35.0"
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: flutter_map_example
description: Example application for 'flutter_map' package
publish_to: "none"
version: 8.3.0
version: 8.3.1

environment:
sdk: ">=3.6.0 <4.0.0"
Expand Down
22 changes: 14 additions & 8 deletions lib/src/layer/polyline_layer/polyline_layer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -208,15 +208,11 @@ class _PolylineLayerState<R extends Object> extends State<PolylineLayer<R>>
continue;
}

final projectedBounds = projectedPolyline.boundingBox;

/// Returns true if the points stretch on different versions of the world.
bool stretchesBeyondTheLimits() {
for (final point in projectedPolyline.points) {
if (point.dx > xEast || point.dx < xWest) {
return true;
}
}
return false;
}
bool stretchesBeyondTheLimits() =>
projectedBounds.right > xEast || projectedBounds.left < xWest;

// TODO: think about how to cull polylines that go beyond -180/180.
// As the notions of projected west/east as min/max are not reliable.
Expand All @@ -235,6 +231,16 @@ class _PolylineLayerState<R extends Object> extends State<PolylineLayer<R>>
// when none of the line is visible. Here, focusing on longitudes.
if (!isOverlappingLongitude()) continue;

// Fast path: when the whole polyline is visible there is nothing to
// cull, so skip the per-segment scan (and its sublist allocations).
if (projBounds.left <= projectedBounds.left &&
projBounds.top <= projectedBounds.top &&
projBounds.right >= projectedBounds.right &&
projBounds.bottom >= projectedBounds.bottom) {
yield projectedPolyline;
continue;
}

// pointer that indicates the start of the visible polyline segment
int start = -1;
bool containsSegment = false;
Expand Down
7 changes: 6 additions & 1 deletion lib/src/layer/polyline_layer/projected_polyline.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ class _ProjectedPolyline<R extends Object> with HitDetectableElement<R> {
final Polyline<R> polyline;
final List<Offset> points;

/// Bounding box of [points], in projected space (cached)
///
/// Computed lazily: culled fragments never use it.
late final Rect boundingBox = RectExtension.containing(points);

@override
R? get hitValue => polyline.hitValue;

const _ProjectedPolyline._({
_ProjectedPolyline._({
required this.polyline,
required this.points,
});
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_map
description: "Flutter's №1 non-commercially aimed map client: it's easy-to-use, versatile, vendor-free, fully cross-platform, and 100% pure-Flutter"
version: 8.3.0
version: 8.3.1

repository: https://github.com/fleaflet/flutter_map
issue_tracker: https://github.com/fleaflet/flutter_map/issues
Expand Down
2 changes: 1 addition & 1 deletion windowsApplicationInstallerSetup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "flutter_map Demo"
#define MyAppVersion "for 8.3.0"
#define MyAppVersion "for 8.3.1"
#define MyAppPublisher "fleaflet"
#define MyAppURL "https://github.com/fleaflet/flutter_map"
#define MyAppSupportURL "https://github.com/fleaflet/flutter_map/issues"
Expand Down
Loading