Skip to content

Commit 8964171

Browse files
authored
chore: prepare for v8.2.0 release (fleaflet#2062)
1 parent a304bfa commit 8964171

File tree

13 files changed

+141
-85
lines changed

13 files changed

+141
-85
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
custom: "https://docs.fleaflet.dev/supporters#support-us"
1+
github: fleaflet

.github/workflows/branch.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
channel: "stable"
8383
cache: true
8484
- name: Build Android Application
85-
run: flutter build apk --dart-define=flutter.flutter_map.unblockOSM="${{ secrets.UNBLOCK_OSM }}"
85+
run: flutter build apk --dart-define=COMMIT_SHA=${{ github.sha }} --dart-define=flutter.flutter_map.unblockOSM="${{ secrets.UNBLOCK_OSM }}"
8686
- name: Archive Artifact
8787
uses: actions/upload-artifact@v4
8888
with:
@@ -105,7 +105,7 @@ jobs:
105105
channel: "stable"
106106
cache: true
107107
- name: Build Windows Application
108-
run: flutter build windows --dart-define=flutter.flutter_map.unblockOSM="${{ secrets.UNBLOCK_OSM }}"
108+
run: flutter build windows --dart-define=COMMIT_SHA=${{ github.sha }} --dart-define=flutter.flutter_map.unblockOSM="${{ secrets.UNBLOCK_OSM }}"
109109
- name: Create Windows Application Installer
110110
run: iscc "windowsApplicationInstallerSetup.iss"
111111
working-directory: .
@@ -131,7 +131,7 @@ jobs:
131131
channel: "stable"
132132
cache: true
133133
- name: Build Web Application
134-
run: flutter build web --wasm --dart-define=flutter.flutter_map.unblockOSM="${{ secrets.UNBLOCK_OSM }}"
134+
run: flutter build web --wasm --dart-define=COMMIT_SHA=${{ github.sha }} --dart-define=flutter.flutter_map.unblockOSM="${{ secrets.UNBLOCK_OSM }}"
135135
- name: Archive Artifact
136136
uses: actions/upload-artifact@v4
137137
with:

.github/workflows/master.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
channel: "stable"
5252
cache: true
5353
- name: Build Android Application
54-
run: flutter build apk --dart-define=flutter.flutter_map.unblockOSM="${{ secrets.UNBLOCK_OSM }}"
54+
run: flutter build apk --dart-define=COMMIT_SHA=${{ github.sha }} --dart-define=flutter.flutter_map.unblockOSM="${{ secrets.UNBLOCK_OSM }}"
5555
- name: Archive Artifact
5656
uses: actions/upload-artifact@v4
5757
with:
@@ -76,7 +76,7 @@ jobs:
7676
channel: "stable"
7777
cache: true
7878
- name: Build Windows Application
79-
run: flutter build windows --dart-define=flutter.flutter_map.unblockOSM="${{ secrets.UNBLOCK_OSM }}"
79+
run: flutter build windows --dart-define=COMMIT_SHA=${{ github.sha }} --dart-define=flutter.flutter_map.unblockOSM="${{ secrets.UNBLOCK_OSM }}"
8080
- name: Create Windows Application Installer
8181
run: iscc "windowsApplicationInstallerSetup.iss"
8282
working-directory: .
@@ -104,7 +104,7 @@ jobs:
104104
channel: "stable"
105105
cache: true
106106
- name: Build Web Application
107-
run: flutter build web --wasm --dart-define=flutter.flutter_map.unblockOSM="${{ secrets.UNBLOCK_OSM }}"
107+
run: flutter build web --wasm --dart-define=COMMIT_SHA=${{ github.sha }} --dart-define=flutter.flutter_map.unblockOSM="${{ secrets.UNBLOCK_OSM }}"
108108
- name: Archive Artifact
109109
uses: actions/upload-artifact@v4
110110
with:

CHANGELOG.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,52 @@
11
# Changelog
22

3-
Please consider [donating](https://docs.fleaflet.dev/supporters#support-us) or [contributing](https://docs.fleaflet.dev/credits#contributing) if you're a fan of what we're doing and you'd like to support future releases!
3+
Please consider [donating](https://github.com/sponsors/fleaflet) or [contributing](https://github.com/fleaflet/flutter_map/blob/master/CONTRIBUTING.md) if you're a fan of what we're doing and you'd like to support future releases!
44

55
This CHANGELOG does not include every commit and/or PR - it is a hand picked selection of the ones that have an effect on you. For a full list of changes, please check the GitHub repository releases/tags.
66

7+
## [8.2.0] - 2025/07/10
8+
9+
Contains the following user-affecting changes:
10+
11+
- Added inverted fill option to `PolygonLayer` - [#2046 (💰)](https://github.com/fleaflet/flutter_map/pull/2046) for [#2034](https://github.com/fleaflet/flutter_map/issues/2034)
12+
- Added `Polyline/gonLayer.oneWorld` parameter - [#2069](https://github.com/fleaflet/flutter_map/pull/2069) for [#2067](https://github.com/fleaflet/flutter_map/issues/2067)
13+
- Added `ContainCameraLatitude` camera constraint - [#2073](https://github.com/fleaflet/flutter_map/pull/2073) for [#2071](https://github.com/fleaflet/flutter_map/issues/2071)
14+
- Added options to customize double-tap (drag) zoom gestures - [#2070](https://github.com/fleaflet/flutter_map/pull/2070)
15+
- Added warning on usage of OpenStreetMap public tile servers with `TileLayer` - [#2074](https://github.com/fleaflet/flutter_map/pull/2074) and [#2109](https://github.com/fleaflet/flutter_map/pull/2109)
16+
- Added `PolygonLayer.painterFillMethod` parameter & changed default fill methods - [#2081](https://github.com/fleaflet/flutter_map/pull/2081)
17+
- Added simple built-in (but extensible) caching to `NetworkTileProvider` - [#2082](https://github.com/fleaflet/flutter_map/pull/2082)
18+
- Added aborting of obsolete in-flight HTTP requests to `NetworkTileProvider` - [#2082](https://github.com/fleaflet/flutter_map/pull/2082)
19+
- Added `CircleLayer.optimizeRadiusInMeters` option to improve performance in some cases - [#2101](https://github.com/fleaflet/flutter_map/pull/2101)
20+
- Replace (with deprecation) `Polygon.labelPlacement` with more flexible and extensible `Polygon.labelPlacementCalculator`/`PolygonLabelPlacementCalculator` system - [#2102](https://github.com/fleaflet/flutter_map/pull/2102)
21+
- Added new 'signed area centroid' algorithm, and switch polylabel label placement implementation to use new external library - [#2102](https://github.com/fleaflet/flutter_map/pull/2102)
22+
23+
Contains the following user-affecting bug fixes:
24+
25+
- Consider `zoomOffset` & emulated retina mode when generating tile coordinates - [#2060](https://github.com/fleaflet/flutter_map/pull/2060) for [#2042](https://github.com/fleaflet/flutter_map/issues/2042)
26+
- Raise attribution widgets above screen insets - [#2058](https://github.com/fleaflet/flutter_map/pull/2058)
27+
- Stop ongoing fling and zoom animations when scroll zooming - [#2066](https://github.com/fleaflet/flutter_map/pull/2066) for [#1767](https://github.com/fleaflet/flutter_map/issues/1767)
28+
- Calculate `LayerHitResult.coordinate` correctly - [#2093](https://github.com/fleaflet/flutter_map/pull/2093) for [#2092](https://github.com/fleaflet/flutter_map/issues/2092)
29+
- Consider that the camera may be over the anti-meridian when creating `LatLngBounds` in `MapCamera.visibleBounds` for polygon culling - [#2091](https://github.com/fleaflet/flutter_map/pull/2091) for [#2080](https://github.com/fleaflet/flutter_map/issues/2080)
30+
- Adjust infinite loop protection in internals which allow multi-world functionality to improve performance and add more debug info on error - [#2113](https://github.com/fleaflet/flutter_map/pull/2113)
31+
- Minor API docs fix on `TileDisplay.fadeIn` arguments - [#2114](https://github.com/fleaflet/flutter_map/pull/2114) for [#2098](https://github.com/fleaflet/flutter_map/issues/2098)
32+
33+
Contains the following meta changes to the package:
34+
35+
- Reduced final package size to ~900KB from >3MB - [#2056](https://github.com/fleaflet/flutter_map/pull/2056)
36+
- Improved build & publish integrity: publishing to pub.dev now occurs directly from the GitHub repo - [#2059](https://github.com/fleaflet/flutter_map/pull/2059)
37+
38+
Many thanks to these contributors (in no particular order):
39+
40+
- @monsieurtanuki
41+
- @Quirille
42+
- @freekvandeven
43+
- @mbenoukaiss
44+
- @ReinisSprogis
45+
- @tidu090
46+
- ... and all the maintainers
47+
48+
And an additional special thanks to @monsieurtanuki for investing so much of their time into this project recently - we appreciate it!
49+
750
## [8.1.1] - 2025/03/08
851

952
Contains the following user-affecting bug fixes:
@@ -13,6 +56,7 @@ Contains the following user-affecting bug fixes:
1356
Many thanks to these contributors (in no particular order):
1457

1558
- @monsieurtanuki
59+
- ... and all the maintainers
1660

1761
## [8.1.0] - 2025/02/25
1862

@@ -29,6 +73,7 @@ Many thanks to these contributors (in no particular order):
2973

3074
- @tlserver
3175
- @monsieurtanuki
76+
- ... and all the maintainers
3277

3378
## [8.0.0] - 2025/02/02
3479

README.md

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,15 @@
1-
# flutter_map
1+
# flutter_map    [![pub.dev](https://img.shields.io/pub/v/flutter_map.svg?label=&style=for-the-badge)](https://pub.dev/packages/flutter_map)
22

3-
A versatile mapping package for Flutter. Simple and easy to learn, yet completely customizable and configurable, it's the best choice for mapping in your Flutter app.
3+
Flutter's №1 non-commercially aimed map client: it's easy-to-use, versatile, vendor-free, fully cross-platform, and 100% pure-Flutter
44

5-
[![pub.dev](https://img.shields.io/pub/v/flutter_map.svg?label=Latest+Version)](https://pub.dev/packages/flutter_map)
6-
[![stars](https://badgen.net/github/stars/fleaflet/flutter_map?label=stars&color=green&icon=github)](https://github.com/fleaflet/flutter_map/stargazers)
7-
[![likes](https://img.shields.io/pub/likes/flutter_map?logo=flutter)](https://pub.dev/packages/flutter_map/score)
8-
      
9-
[![codecov](https://codecov.io/gh/fleaflet/flutter_map/graph/badge.svg?token=LgYgZQ0Yjj)](https://codecov.io/gh/fleaflet/flutter_map)
10-
[![Open Issues](https://badgen.net/github/open-issues/fleaflet/flutter_map?label=Open+Issues&color=green)](https://GitHub.com/fleaflet/flutter_map/issues)
11-
[![Open PRs](https://badgen.net/github/open-prs/fleaflet/flutter_map?label=Open+PRs&color=green)](https://GitHub.com/fleaflet/flutter_map/pulls)
5+
* ### [📖 **Read the docs**](https://docs.fleaflet.dev/)
126

13-
## [Donate](https://docs.fleaflet.dev/supporters#support-us)
7+
* ### [🚀 **Launch the web demo**](https://demo.fleaflet.dev/)
148

15-
We now accept one-time donations via Stripe! We're extremely grateful for anything you can spare. We'll donate 15% of what we receive to the OpenStreetMap Foundation, as a thanks for their excellent work.
16-
For more information, details about benefits, and the link to donate, please see [Donate](https://docs.fleaflet.dev/supporters#support-us).
9+
* ### [✍️ **Visit the GitHub source**](https://github.com/fleaflet/flutter_map)
1710

18-
## [Documentation](https://docs.fleaflet.dev/)
11+
* ### [📦 **Visit the pub.dev package**](https://pub.dev/packages/flutter_map)
1912

20-
Visit our [documentation website](https://docs.fleaflet.dev/), for all information about how to use this library.
21-
Additional documentation can be found in-code/whilst you type and over at the [pub.dev package](https://pub.dev/documentation/flutter_map/latest/flutter_map/flutter_map-library.html).
13+
* ### [💬 **Join our Discord server**](https://discord.gg/BwpEsjqMAH)
2214

23-
## [Live Web Demo](https://demo.fleaflet.dev/)
24-
25-
> Please don't abuse the web demo! It runs on limited bandwidth and won't hold up to thousands of loads.
26-
If you're going to be straining the application, please see the [Examples page in the docs](https://docs.fleaflet.dev/getting-started/examples), for information about building/using the application locally.
27-
28-
Want to see how flutter_map looks and works quickly? Just visit our [demo site](https://demo.fleaflet.dev/) that gets updated automatically with every new commit to 'master'!
29-
30-
## [Get Help](https://docs.fleaflet.dev/#get-help)
31-
32-
Not sure about how to do something, or just want to chat? Pop over to our [Discord server](https://discord.gg/BwpEsjqMAH) to get support quickly, and to get notified about new releases!
33-
Think you've found a bug, or would like to see a new feature? We'd love to hear about it! Please see the [Get Help section of our docs](https://docs.fleaflet.dev/#get-help) for information about what to do.
15+
* ### [💝 **Support us**](https://github.com/sponsors/fleaflet)

example/lib/widgets/drawer/menu_drawer.dart

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
import 'dart:math';
2+
13
import 'package:flutter/foundation.dart';
4+
import 'package:flutter/gestures.dart';
25
import 'package:flutter/material.dart';
36
import 'package:flutter_map_example/pages/abort_obsolete_requests.dart';
47
import 'package:flutter_map_example/pages/animated_map_controller.dart';
@@ -34,8 +37,10 @@ import 'package:flutter_map_example/pages/tile_builder.dart';
3437
import 'package:flutter_map_example/pages/tile_loading_error_handle.dart';
3538
import 'package:flutter_map_example/pages/wms_tile_layer.dart';
3639
import 'package:flutter_map_example/widgets/drawer/menu_item.dart';
40+
import 'package:url_launcher/url_launcher.dart';
3741

3842
const _isWASM = bool.fromEnvironment('dart.tool.dart2wasm');
43+
const _commitSHA = String.fromEnvironment('COMMIT_SHA');
3944

4045
class MenuDrawer extends StatelessWidget {
4146
final String currentRoute;
@@ -78,6 +83,45 @@ class MenuDrawer extends StatelessWidget {
7883
textAlign: TextAlign.center,
7984
style: Theme.of(context).textTheme.bodySmall,
8085
),
86+
if (_commitSHA != '')
87+
SelectableText.rich(
88+
TextSpan(
89+
style: DefaultTextStyle.of(context).style,
90+
children: [
91+
const TextSpan(text: 'Built from: '),
92+
TextSpan(
93+
children: [
94+
TextSpan(
95+
text: '${_commitSHA.substring(
96+
0,
97+
min(_commitSHA.length, 7),
98+
)} ',
99+
recognizer: TapGestureRecognizer()
100+
..onTap = _openCommit,
101+
),
102+
WidgetSpan(
103+
child: MouseRegion(
104+
cursor: SystemMouseCursors.click,
105+
child: GestureDetector(
106+
onTap: _openCommit,
107+
child: const Icon(
108+
Icons.open_in_new,
109+
size: 14,
110+
color: Colors.blue,
111+
),
112+
),
113+
),
114+
),
115+
],
116+
style: const TextStyle(
117+
color: Colors.blue,
118+
decoration: TextDecoration.underline,
119+
decorationColor: Colors.blue,
120+
),
121+
),
122+
],
123+
),
124+
),
81125
],
82126
),
83127
),
@@ -261,4 +305,8 @@ class MenuDrawer extends StatelessWidget {
261305
),
262306
);
263307
}
308+
309+
void _openCommit() => launchUrl(
310+
Uri.parse('https://github.com/fleaflet/flutter_map/commit/$_commitSHA'),
311+
);
264312
}

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ packages:
116116
path: ".."
117117
relative: true
118118
source: path
119-
version: "8.1.1"
119+
version: "8.2.0"
120120
flutter_test:
121121
dependency: "direct dev"
122122
description: flutter

example/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: flutter_map_example
22
description: Example application for 'flutter_map' package
33
publish_to: "none"
4-
version: 8.1.1
4+
version: 8.2.0
55

66
environment:
77
sdk: ">=3.6.0 <4.0.0"
@@ -13,10 +13,10 @@ dependencies:
1313
flutter_map:
1414
flutter_web_plugins:
1515
sdk: flutter
16-
http: ^1.2.2
16+
http: ^1.3.0
1717
latlong2: ^0.9.1
1818
proj4dart: ^2.1.0
19-
shared_preferences: ^2.3.4
19+
shared_preferences: ^2.5.3
2020
url_launcher: ^6.3.1
2121

2222
dependency_overrides:

lib/src/layer/tile_layer/tile_display.dart

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,14 @@ sealed class TileDisplay {
3434
/// Duration of the fade. Defaults to 100ms.
3535
Duration duration,
3636

37-
/// Opacity start value when a tile is faded in, default 0.0. The allowed
38-
/// range is (0.0 - 1.0).
37+
/// Opacity start value when a tile is faded in.
38+
///
39+
/// Defaults to 0. Must be in the range (inclusive) 0 - 1.
3940
double startOpacity,
4041

41-
/// Opacity start value when a tile is reloaded, default 0.0. Valid range is
42-
/// (0.0 - 1.0).
42+
/// Opacity start value when a tile is reloaded.
43+
///
44+
/// Defaults to 0. Must be in the range (inclusive) 0 - 1.
4345
double reloadStartOpacity,
4446
}) = FadeInTileDisplay._;
4547

@@ -56,7 +58,7 @@ sealed class TileDisplay {
5658
}
5759
}
5860

59-
/// Display the tile instantaneous.
61+
/// Displays a tile instantaneously
6062
@immutable
6163
class InstantaneousTileDisplay extends TileDisplay {
6264
/// The optional opacity of the tile.
@@ -80,7 +82,7 @@ class InstantaneousTileDisplay extends TileDisplay {
8082
int get hashCode => opacity.hashCode;
8183
}
8284

83-
/// A [TileDisplay] that should get faded in.
85+
/// Displays a tile with a fade-in animation
8486
@immutable
8587
class FadeInTileDisplay extends TileDisplay {
8688
/// The duration of the fade in animation.

lib/src/layer/tile_layer/tile_layer.dart

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -278,32 +278,9 @@ class TileLayer extends StatefulWidget {
278278
tileProvider = tileProvider ?? NetworkTileProvider(),
279279
tileUpdateTransformer =
280280
tileUpdateTransformer ?? TileUpdateTransformers.ignoreTapEvents {
281-
if (kDebugMode &&
282-
retinaMode == null &&
283-
urlTemplate != null &&
284-
urlTemplate!.contains('{r}')) {
285-
Logger(printer: PrettyPrinter(methodCount: 0)).i(
286-
'\x1B[1m\x1B[3mflutter_map\x1B[0m\nThe URL template includes a retina '
287-
"mode placeholder ('{r}') to retrieve native high-resolution\ntiles, "
288-
'which improve appearance especially on high-density displays.\n'
289-
'However, `TileLayer.retinaMode` was left unset, meaning flutter_map '
290-
'will never retrieve these tiles.\nConsider using '
291-
'`RetinaMode.isHighDensity` to toggle this property automatically, '
292-
'otherwise ensure\nit is set appropriately.\n'
293-
'See https://docs.fleaflet.dev/layers/tile-layer for more info.',
294-
);
295-
}
296-
if (kDebugMode && kIsWeb && tileProvider is NetworkTileProvider?) {
297-
Logger(printer: PrettyPrinter(methodCount: 0)).i(
298-
'\x1B[1m\x1B[3mflutter_map\x1B[0m\nConsider installing the official '
299-
"'flutter_map_cancellable_tile_provider' plugin for improved\n"
300-
'performance on the web.\nSee '
301-
'https://pub.dev/packages/flutter_map_cancellable_tile_provider for '
302-
'more info.',
303-
);
304-
}
305-
306-
// Tile Provider Setup
281+
// If the tile provider doesn't define a User-Agent, we define it here.
282+
// This is so there's a convienient way for users to specifiy the agent
283+
// without always having to manually specify a tile provider and headers.
307284
if (!kIsWeb) {
308285
this.tileProvider.headers.putIfAbsent(
309286
'User-Agent', () => 'flutter_map ($userAgentPackageName)');
@@ -419,6 +396,19 @@ See:
419396
_resetSub = widget.reset?.listen(_resetStreamHandler);
420397
_tileRangeCalculator = TileRangeCalculator(tileDimension: _tileDimension);
421398
_warnOpenStreetMapUrl();
399+
400+
// These log strong hints in debug mode, which is more visible to users than
401+
// just documentation - they should only be used where there is a specific
402+
// and large risk of the user doing something wrong.
403+
if (kDebugMode &&
404+
widget.urlTemplate != null &&
405+
widget.urlTemplate!.contains('{s}.tile.openstreetmap.org')) {
406+
Logger(printer: PrettyPrinter(methodCount: 0)).w(
407+
'\x1B[1m\x1B[3mflutter_map\x1B[0m\nAvoid using subdomains with OSM\'s tile '
408+
'server. Support may be become slow or be removed in future.\nSee '
409+
'https://github.com/openstreetmap/operations/issues/737 for more info.',
410+
);
411+
}
422412
}
423413

424414
// This is called on every map movement so we should avoid expensive logic

0 commit comments

Comments
 (0)