From 0acd07a90e58c81a6726fcf752c48d8631a15815 Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Sun, 23 Mar 2025 11:50:54 +0000 Subject: [PATCH 01/21] Prepare for v8.2.0 --- CHANGELOG.md | 22 ++++++++++++++++++++++ example/pubspec.yaml | 2 +- pubspec.yaml | 2 +- windowsApplicationInstallerSetup.iss | 2 +- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb50845bf..f4a5289e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,28 @@ Please consider [donating](https://docs.fleaflet.dev/supporters#support-us) or [ 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. +## [8.2.0] - 2025/XX/XX + +Contains the following user-affecting changes: + +- 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) + +Contains the following user-affecting bug fixes: + +- 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) +- Raise attribution widgets above screen insets - [#2058](https://github.com/fleaflet/flutter_map/pull/2058) + +Contains the following meta changes to the package: + +- Reduced final package size to ~900KB from >3MB - [#2056](https://github.com/fleaflet/flutter_map/pull/2056) +- Improved build integrity: publishing now occurs directly from the Git(Hub) repo - [#2059](https://github.com/fleaflet/flutter_map/pull/2059) + +Many thanks to these contributors (in no particular order): + +- @monsieurtanuki + +And an additional special thanks to @monsieurtanuki for investing so much of their time into this project recently - we appreciate it! + ## [8.1.1] - 2025/03/08 Contains the following user-affecting bug fixes: diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 1e79a8509..4e1f05f73 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,7 +1,7 @@ name: flutter_map_example description: Example application for 'flutter_map' package publish_to: "none" -version: 8.1.1 +version: 8.2.0 environment: sdk: ">=3.6.0 <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 65019902f..e7e9b95fe 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_map description: A versatile mapping package for Flutter, that's simple and easy to learn, yet completely customizable and configurable -version: 8.1.1 +version: 8.2.0 repository: https://github.com/fleaflet/flutter_map issue_tracker: https://github.com/fleaflet/flutter_map/issues diff --git a/windowsApplicationInstallerSetup.iss b/windowsApplicationInstallerSetup.iss index 2ddb822ed..c493974f7 100644 --- a/windowsApplicationInstallerSetup.iss +++ b/windowsApplicationInstallerSetup.iss @@ -2,7 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "flutter_map Demo" -#define MyAppVersion "for 8.1.1" +#define MyAppVersion "for 8.2.0" #define MyAppPublisher "fleaflet" #define MyAppURL "https://github.com/fleaflet/flutter_map" #define MyAppSupportURL "https://github.com/fleaflet/flutter_map/issues" From 7821edc95067f43958b592764e5b34c9297ef7fc Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Mon, 24 Mar 2025 21:21:03 +0000 Subject: [PATCH 02/21] Rewritten README Display commit SHA in example app & updated workflows Replaced funding link with GitHub Sponsors --- .github/FUNDING.yml | 2 +- .github/workflows/branch.yml | 6 ++-- .github/workflows/master.yml | 6 ++-- README.md | 37 ++++----------------- example/lib/widgets/drawer/menu_drawer.dart | 32 +++++++++++++++++- 5 files changed, 45 insertions(+), 38 deletions(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 2c9cff271..f827d932a 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1 @@ -custom: "https://docs.fleaflet.dev/supporters#support-us" \ No newline at end of file +github: fleaflet diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml index 8c476f5e6..f2a3ed4ac 100644 --- a/.github/workflows/branch.yml +++ b/.github/workflows/branch.yml @@ -82,7 +82,7 @@ jobs: channel: "stable" cache: true - name: Build Android Application - run: flutter build apk + run: flutter build apk --dart-define=COMMIT_SHA=${{ github.sha }} - name: Archive Artifact uses: actions/upload-artifact@v4 with: @@ -105,7 +105,7 @@ jobs: channel: "stable" cache: true - name: Build Windows Application - run: flutter build windows + run: flutter build windows --dart-define=COMMIT_SHA=${{ github.sha }} - name: Create Windows Application Installer run: iscc "windowsApplicationInstallerSetup.iss" working-directory: . @@ -131,7 +131,7 @@ jobs: channel: "stable" cache: true - name: Build Web Application - run: flutter build web --wasm + run: flutter build web --wasm --dart-define=COMMIT_SHA=${{ github.sha }} - name: Archive Artifact uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 70b27ad2c..b9191ae60 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -51,7 +51,7 @@ jobs: channel: "stable" cache: true - name: Build Android Application - run: flutter build apk + run: flutter build apk --dart-define=COMMIT_SHA=${{ github.sha }} - name: Archive Artifact uses: actions/upload-artifact@v4 with: @@ -76,7 +76,7 @@ jobs: channel: "stable" cache: true - name: Build Windows Application - run: flutter build windows + run: flutter build windows --dart-define=COMMIT_SHA=${{ github.sha }} - name: Create Windows Application Installer run: iscc "windowsApplicationInstallerSetup.iss" working-directory: . @@ -104,7 +104,7 @@ jobs: channel: "stable" cache: true - name: Build Web Application - run: flutter build web --wasm + run: flutter build web --wasm --dart-define=COMMIT_SHA=${{ github.sha }} - name: Archive Artifact uses: actions/upload-artifact@v4 with: diff --git a/README.md b/README.md index 8367f981a..3247a3ff2 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,10 @@ -# flutter_map +# flutter_map    [![pub.dev](https://img.shields.io/pub/v/flutter_map.svg?label=&style=for-the-badge)](https://pub.dev/packages/flutter_map) 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. -[![pub.dev](https://img.shields.io/pub/v/flutter_map.svg?label=Latest+Version)](https://pub.dev/packages/flutter_map) -[![stars](https://badgen.net/github/stars/fleaflet/flutter_map?label=stars&color=green&icon=github)](https://github.com/fleaflet/flutter_map/stargazers) -[![likes](https://img.shields.io/pub/likes/flutter_map?logo=flutter)](https://pub.dev/packages/flutter_map/score) -       -[![codecov](https://codecov.io/gh/fleaflet/flutter_map/graph/badge.svg?token=LgYgZQ0Yjj)](https://codecov.io/gh/fleaflet/flutter_map) -[![Open Issues](https://badgen.net/github/open-issues/fleaflet/flutter_map?label=Open+Issues&color=green)](https://GitHub.com/fleaflet/flutter_map/issues) -[![Open PRs](https://badgen.net/github/open-prs/fleaflet/flutter_map?label=Open+PRs&color=green)](https://GitHub.com/fleaflet/flutter_map/pulls) - -## [Donate](https://docs.fleaflet.dev/supporters#support-us) - -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. -For more information, details about benefits, and the link to donate, please see [Donate](https://docs.fleaflet.dev/supporters#support-us). - -## [Documentation](https://docs.fleaflet.dev/) - -Visit our [documentation website](https://docs.fleaflet.dev/), for all information about how to use this library. -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). - -## [Live Web Demo](https://demo.fleaflet.dev/) - -> Please don't abuse the web demo! It runs on limited bandwidth and won't hold up to thousands of loads. -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. - -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'! - -## [Get Help](https://docs.fleaflet.dev/#get-help) - -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! -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. +[![Read the docs](https://gist.github.com/cxmeel/0dbc95191f239b631c3874f4ccf114e2/raw/docs.svg)](https://docs.fleaflet.dev/) +[![Visit our web demo](https://gist.github.com/cxmeel/0dbc95191f239b631c3874f4ccf114e2/raw/play-icon.svg)](https://demo.fleaflet.dev/)       +[![GitHub source](https://gist.github.com/cxmeel/0dbc95191f239b631c3874f4ccf114e2/raw/github-icon.svg)](https://github.com/fleaflet/flutter_map) +[![pub.dev package](https://gist.github.com/cxmeel/0dbc95191f239b631c3874f4ccf114e2/raw/download-icon.svg)](https://pub.dev/packages/flutter_map) +[![Join our Discord](https://gist.github.com/cxmeel/0dbc95191f239b631c3874f4ccf114e2/raw/discord-icon.svg)](https://discord.gg/BwpEsjqMAH) +[![Support us](https://gist.github.com/cxmeel/0dbc95191f239b631c3874f4ccf114e2/raw/github_sponsor-icon.svg)](https://github.com/sponsors/fleaflet) diff --git a/example/lib/widgets/drawer/menu_drawer.dart b/example/lib/widgets/drawer/menu_drawer.dart index ad6563476..4285efacf 100644 --- a/example/lib/widgets/drawer/menu_drawer.dart +++ b/example/lib/widgets/drawer/menu_drawer.dart @@ -1,4 +1,5 @@ import 'package:flutter/foundation.dart'; +import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter_map_example/pages/animated_map_controller.dart'; import 'package:flutter_map_example/pages/bundled_offline_map.dart'; @@ -34,8 +35,10 @@ import 'package:flutter_map_example/pages/tile_builder.dart'; import 'package:flutter_map_example/pages/tile_loading_error_handle.dart'; import 'package:flutter_map_example/pages/wms_tile_layer.dart'; import 'package:flutter_map_example/widgets/drawer/menu_item.dart'; +import 'package:url_launcher/url_launcher.dart'; const _isWASM = bool.fromEnvironment('dart.tool.dart2wasm'); +const _commitSHA = String.fromEnvironment('COMMIT_SHA'); class MenuDrawer extends StatelessWidget { final String currentRoute; @@ -47,7 +50,13 @@ class MenuDrawer extends StatelessWidget { return Drawer( child: ListView( children: [ - DrawerHeader( + Container( + padding: const EdgeInsets.fromLTRB(16, 32, 16, 16) + .add(EdgeInsets.only(top: MediaQuery.paddingOf(context).top)), + margin: const EdgeInsets.only(bottom: 8), + decoration: BoxDecoration( + border: Border(bottom: Divider.createBorderSide(context)), + ), child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ @@ -71,6 +80,27 @@ class MenuDrawer extends StatelessWidget { textAlign: TextAlign.center, style: TextStyle(fontSize: 14), ), + if (_commitSHA != '') + RichText( + text: TextSpan( + children: [ + const TextSpan(text: 'Built from: '), + TextSpan( + text: _commitSHA.substring(0, 7), + style: const TextStyle( + color: Colors.blue, + decoration: TextDecoration.underline, + ), + recognizer: TapGestureRecognizer() + ..onTap = () => launchUrl( + Uri.parse( + 'https://github.com/fleaflet/flutter_map/commit/$_commitSHA', + ), + ), + ), + ], + ), + ), ], ), ), From 392f1b99d297aafb60a49d9ddf985fc23f7bf533 Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Mon, 24 Mar 2025 21:31:08 +0000 Subject: [PATCH 03/21] Fixed README --- README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3247a3ff2..6c00297b4 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,14 @@ 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. -[![Read the docs](https://gist.github.com/cxmeel/0dbc95191f239b631c3874f4ccf114e2/raw/docs.svg)](https://docs.fleaflet.dev/) -[![Visit our web demo](https://gist.github.com/cxmeel/0dbc95191f239b631c3874f4ccf114e2/raw/play-icon.svg)](https://demo.fleaflet.dev/)       -[![GitHub source](https://gist.github.com/cxmeel/0dbc95191f239b631c3874f4ccf114e2/raw/github-icon.svg)](https://github.com/fleaflet/flutter_map) -[![pub.dev package](https://gist.github.com/cxmeel/0dbc95191f239b631c3874f4ccf114e2/raw/download-icon.svg)](https://pub.dev/packages/flutter_map) -[![Join our Discord](https://gist.github.com/cxmeel/0dbc95191f239b631c3874f4ccf114e2/raw/discord-icon.svg)](https://discord.gg/BwpEsjqMAH) -[![Support us](https://gist.github.com/cxmeel/0dbc95191f239b631c3874f4ccf114e2/raw/github_sponsor-icon.svg)](https://github.com/sponsors/fleaflet) +* ### [📖 **Read the docs**](https://docs.fleaflet.dev/) + +* ### [🚀 **Launch the web demo**](https://demo.fleaflet.dev/) + +* ### [✍️ **Visit the GitHub source**](https://github.com/fleaflet/flutter_map) + +* ### [📦 **Visit the pub.dev package**](https://pub.dev/packages/flutter_map) + +* ### [💬 **Join our Discord server**](https://discord.gg/BwpEsjqMAH) + +* ### [💝 **Support us**](https://github.com/sponsors/fleaflet) From 1e298f366ad4dba5b63d4f67fa190b5964b4291c Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Wed, 26 Mar 2025 22:28:49 +0000 Subject: [PATCH 04/21] Update funding link in pubspec --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index e7e9b95fe..115c1ee66 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -7,7 +7,7 @@ issue_tracker: https://github.com/fleaflet/flutter_map/issues documentation: https://docs.fleaflet.dev funding: - - https://docs.fleaflet.dev/supporters#support-us + - https://github.com/sponsors/fleaflet topics: - flutter-map From bd3c495e77c69a0e2ffad434cedcbbb68cb1acce Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Wed, 26 Mar 2025 23:20:03 +0000 Subject: [PATCH 05/21] Updated project description --- README.md | 2 +- pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6c00297b4..ed5ef4da0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # flutter_map    [![pub.dev](https://img.shields.io/pub/v/flutter_map.svg?label=&style=for-the-badge)](https://pub.dev/packages/flutter_map) -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. +Flutter's №1 non-commercially aimed map client: it's easy-to-use, versatile, vendor-free, and 100% pure-Flutter * ### [📖 **Read the docs**](https://docs.fleaflet.dev/) diff --git a/pubspec.yaml b/pubspec.yaml index 115c1ee66..7e7b9b986 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: flutter_map -description: A versatile mapping package for Flutter, that's simple and easy to learn, yet completely customizable and configurable +description: "Flutter's №1 non-commercially aimed map client: it's easy-to-use, versatile, vendor-free, and 100% pure-Flutter" version: 8.2.0 repository: https://github.com/fleaflet/flutter_map From b2e85e0ea426449206042bebf036aabe06964413 Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Thu, 27 Mar 2025 09:19:16 +0000 Subject: [PATCH 06/21] Updated description --- README.md | 2 +- pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ed5ef4da0..45169a422 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # flutter_map    [![pub.dev](https://img.shields.io/pub/v/flutter_map.svg?label=&style=for-the-badge)](https://pub.dev/packages/flutter_map) -Flutter's №1 non-commercially aimed map client: it's easy-to-use, versatile, vendor-free, and 100% pure-Flutter +Flutter's №1 non-commercially aimed map client: it's easy-to-use, versatile, vendor-free, fully cross-platform, and 100% pure-Flutter * ### [📖 **Read the docs**](https://docs.fleaflet.dev/) diff --git a/pubspec.yaml b/pubspec.yaml index 7e7b9b986..be00d305b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: flutter_map -description: "Flutter's №1 non-commercially aimed map client: it's easy-to-use, versatile, vendor-free, and 100% pure-Flutter" +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.2.0 repository: https://github.com/fleaflet/flutter_map From 78add2168c651424b47325d229d03fb6f6f90584 Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Thu, 27 Mar 2025 17:12:53 +0000 Subject: [PATCH 07/21] Updated changelog to include #2066 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4a5289e3..f5b22a6b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ Contains the following user-affecting bug fixes: - 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) - Raise attribution widgets above screen insets - [#2058](https://github.com/fleaflet/flutter_map/pull/2058) +- 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) Contains the following meta changes to the package: From 008a310ba931c7d0bf9729943ee861f45105e3d5 Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Thu, 3 Apr 2025 22:45:14 +0100 Subject: [PATCH 08/21] Restore tile layer warning when using OSM tile server with subdomains (there is still indicators that it is actively dissuading users) --- lib/src/layer/tile_layer/tile_layer.dart | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/src/layer/tile_layer/tile_layer.dart b/lib/src/layer/tile_layer/tile_layer.dart index a2998d19c..0c9ffe337 100644 --- a/lib/src/layer/tile_layer/tile_layer.dart +++ b/lib/src/layer/tile_layer/tile_layer.dart @@ -277,6 +277,18 @@ class TileLayer extends StatefulWidget { tileProvider = tileProvider ?? NetworkTileProvider(), tileUpdateTransformer = tileUpdateTransformer ?? TileUpdateTransformers.ignoreTapEvents { + // These log strong hints in debug mode, which is more visible to users than + // just documentation - they should only be used where there is a specific + // and large risk of the user doing something wrong. + if (kDebugMode && + urlTemplate != null && + urlTemplate!.contains('{s}.tile.openstreetmap.org')) { + Logger(printer: PrettyPrinter(methodCount: 0)).w( + '\x1B[1m\x1B[3mflutter_map\x1B[0m\nAvoid using subdomains with OSM\'s tile ' + 'server. Support may be become slow or be removed in future.\nSee ' + 'https://github.com/openstreetmap/operations/issues/737 for more info.', + ); + } if (kDebugMode && retinaMode == null && urlTemplate != null && @@ -302,7 +314,9 @@ class TileLayer extends StatefulWidget { ); } - // Tile Provider Setup + // If the tile provider doesn't define a User-Agent, we define it here. + // This is so there's a convienient way for users to specifiy the agent + // without always having to manually specify a tile provider and headers. if (!kIsWeb) { this.tileProvider.headers.putIfAbsent( 'User-Agent', () => 'flutter_map ($userAgentPackageName)'); From 97759e62828abcd4b0189d0435cb6e90ca37e072 Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Sun, 6 Apr 2025 14:48:32 +0100 Subject: [PATCH 09/21] Updated example app dependencies --- example/pubspec.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 4e1f05f73..9b8976404 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -11,14 +11,14 @@ dependencies: flutter: sdk: flutter flutter_map: - flutter_map_cancellable_tile_provider: ^3.0.2 + flutter_map_cancellable_tile_provider: ^3.1.0 flutter_map_geojson: ^1.0.8 flutter_web_plugins: sdk: flutter - http: ^1.2.2 + http: ^1.3.0 latlong2: ^0.9.1 proj4dart: ^2.1.0 - shared_preferences: ^2.3.4 + shared_preferences: ^2.5.3 url_launcher: ^6.3.1 vector_math: ^2.1.4 From 720ec2c04f8b8935de0bb3e5b8b04edffc68f582 Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Sun, 6 Apr 2025 15:00:01 +0100 Subject: [PATCH 10/21] Updated example app dependencies --- example/pubspec.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example/pubspec.lock b/example/pubspec.lock index 029357d84..07434eddc 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -108,7 +108,7 @@ packages: path: ".." relative: true source: path - version: "8.1.1" + version: "8.2.0" flutter_map_cancellable_tile_provider: dependency: "direct main" description: @@ -315,10 +315,10 @@ packages: dependency: "direct main" description: name: shared_preferences - sha256: "846849e3e9b68f3ef4b60c60cf4b3e02e9321bc7f4d8c4692cf87ffa82fc8a3a" + sha256: "6e8bf70b7fef813df4e9a36f658ac46d107db4b4cfe1048b477d4e453a8159f5" url: "https://pub.dev" source: hosted - version: "2.5.2" + version: "2.5.3" shared_preferences_android: dependency: transitive description: From c2c6af11f67bbdb5cdca7357f4dc550b97a46f15 Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Mon, 7 Apr 2025 11:24:20 +0100 Subject: [PATCH 11/21] Updated CHANGELOG --- CHANGELOG.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5b22a6b9..60b3bf6b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,16 @@ # Changelog -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! +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! 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. -## [8.2.0] - 2025/XX/XX +## [8.2.0] - 2025/04/XX Contains the following user-affecting changes: -- 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) +- 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) +- Added options to customize double-tap (drag) zoom gestures - [#2070](https://github.com/fleaflet/flutter_map/pull/2070) +- Added `Polyline/gonLayer.oneWorld` parameter - [#2069](https://github.com/fleaflet/flutter_map/pull/2069) Contains the following user-affecting bug fixes: @@ -19,11 +21,13 @@ Contains the following user-affecting bug fixes: Contains the following meta changes to the package: - Reduced final package size to ~900KB from >3MB - [#2056](https://github.com/fleaflet/flutter_map/pull/2056) -- Improved build integrity: publishing now occurs directly from the Git(Hub) repo - [#2059](https://github.com/fleaflet/flutter_map/pull/2059) +- Improved build integrity: publishing now occurs directly from the GitHub repo - [#2059](https://github.com/fleaflet/flutter_map/pull/2059) Many thanks to these contributors (in no particular order): - @monsieurtanuki +- @Quirille +- @freekvandeven And an additional special thanks to @monsieurtanuki for investing so much of their time into this project recently - we appreciate it! From 4cab26557f1d3cbce01304615becfb7b0e6ff073 Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Tue, 8 Apr 2025 21:50:23 +0100 Subject: [PATCH 12/21] Remove HTML/CanvasKit warning --- lib/src/map/widget.dart | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lib/src/map/widget.dart b/lib/src/map/widget.dart index 14a09ed17..f842037fd 100644 --- a/lib/src/map/widget.dart +++ b/lib/src/map/widget.dart @@ -60,15 +60,6 @@ class _FlutterMapStateContainer extends State WidgetsBinding.instance .addPostFrameCallback((_) => widget.options.onMapReady?.call()); - - if (kDebugMode && kIsWeb && !isCanvasKit) { - Logger(printer: PrettyPrinter(methodCount: 0)).w( - '\x1B[1m\x1B[3mflutter_map\x1B[0m\nAvoid using HTML rendering on the web ' - 'platform. Prefer CanvasKit.\nSee ' - 'https://docs.fleaflet.dev/getting-started/installation#web for more ' - 'info.', - ); - } } @override From d5c21808105c17d65e8bf0fcba624c29f29301e1 Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Tue, 8 Apr 2025 21:55:32 +0100 Subject: [PATCH 13/21] Fix linting issue --- lib/src/map/widget.dart | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/src/map/widget.dart b/lib/src/map/widget.dart index f842037fd..bdab77d8b 100644 --- a/lib/src/map/widget.dart +++ b/lib/src/map/widget.dart @@ -1,9 +1,7 @@ -import 'package:flutter/foundation.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_map/flutter_map.dart'; import 'package:flutter_map/src/gestures/map_interactive_viewer.dart'; import 'package:flutter_map/src/map/inherited_model.dart'; -import 'package:logger/logger.dart'; /// An interactive geographical map /// From 2a89523477bd0e8f40232f04d8f76024485713af Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Fri, 16 May 2025 12:16:52 +0100 Subject: [PATCH 14/21] Updated CHANGELOG --- CHANGELOG.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60b3bf6b3..21c3ad1f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,30 +4,37 @@ 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 you. For a full list of changes, please check the GitHub repository releases/tags. -## [8.2.0] - 2025/04/XX +## [8.2.0] - 2025/05/XX Contains the following user-affecting changes: - 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) +- Added `Polyline/gonLayer.oneWorld` parameter - [#2069](https://github.com/fleaflet/flutter_map/pull/2069) for [#2067](https://github.com/fleaflet/flutter_map/issues/2067) +- Added `ContainCameraLatitude` camera constraint - [#2073](https://github.com/fleaflet/flutter_map/pull/2073) for [#2071](https://github.com/fleaflet/flutter_map/issues/2071) - Added options to customize double-tap (drag) zoom gestures - [#2070](https://github.com/fleaflet/flutter_map/pull/2070) -- Added `Polyline/gonLayer.oneWorld` parameter - [#2069](https://github.com/fleaflet/flutter_map/pull/2069) +- Added warning on usage of OpenStreetMap public tile servers with `TileLayer` - [#2074](https://github.com/fleaflet/flutter_map/pull/2074) +- Added `PolygonLayer.painterFillMethod` parameter & changed default fill methods - [#2081](https://github.com/fleaflet/flutter_map/pull/2081) +- Added simple built-in (but extendable) caching to `NetworkTileProvider` - [#2082](https://github.com/fleaflet/flutter_map/pull/2082) Contains the following user-affecting bug fixes: - 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) - Raise attribution widgets above screen insets - [#2058](https://github.com/fleaflet/flutter_map/pull/2058) - 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) +- Calculate `LayerHitResult.coordinate` correctly - [#2093](https://github.com/fleaflet/flutter_map/pull/2093) for [#2092](https://github.com/fleaflet/flutter_map/issues/2092) +- 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) Contains the following meta changes to the package: - Reduced final package size to ~900KB from >3MB - [#2056](https://github.com/fleaflet/flutter_map/pull/2056) -- Improved build integrity: publishing now occurs directly from the GitHub repo - [#2059](https://github.com/fleaflet/flutter_map/pull/2059) +- Improved build & publish integrity: publishing to pub.dev now occurs directly from the GitHub repo - [#2059](https://github.com/fleaflet/flutter_map/pull/2059) Many thanks to these contributors (in no particular order): - @monsieurtanuki - @Quirille - @freekvandeven +- @mbenoukaiss And an additional special thanks to @monsieurtanuki for investing so much of their time into this project recently - we appreciate it! From 0f705165003af9d9340700963edf5df7314a6642 Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Fri, 16 May 2025 12:48:38 +0100 Subject: [PATCH 15/21] Minor improvements to commit SHA display in example app --- example/lib/widgets/drawer/menu_drawer.dart | 42 ++++++++++++++++----- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/example/lib/widgets/drawer/menu_drawer.dart b/example/lib/widgets/drawer/menu_drawer.dart index a740e42e3..34235cd23 100644 --- a/example/lib/widgets/drawer/menu_drawer.dart +++ b/example/lib/widgets/drawer/menu_drawer.dart @@ -1,3 +1,5 @@ +import 'dart:math'; + import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; @@ -81,22 +83,40 @@ class MenuDrawer extends StatelessWidget { style: TextStyle(fontSize: 14), ), if (_commitSHA != '') - RichText( - text: TextSpan( + SelectableText.rich( + TextSpan( + style: DefaultTextStyle.of(context).style, children: [ const TextSpan(text: 'Built from: '), TextSpan( - text: _commitSHA.substring(0, 7), + children: [ + TextSpan( + text: '${_commitSHA.substring( + 0, + min(_commitSHA.length, 7), + )} ', + recognizer: TapGestureRecognizer() + ..onTap = _openCommit, + ), + WidgetSpan( + child: MouseRegion( + cursor: SystemMouseCursors.click, + child: GestureDetector( + onTap: _openCommit, + child: const Icon( + Icons.open_in_new, + size: 14, + color: Colors.blue, + ), + ), + ), + ), + ], style: const TextStyle( color: Colors.blue, decoration: TextDecoration.underline, + decorationColor: Colors.blue, ), - recognizer: TapGestureRecognizer() - ..onTap = () => launchUrl( - Uri.parse( - 'https://github.com/fleaflet/flutter_map/commit/$_commitSHA', - ), - ), ), ], ), @@ -284,4 +304,8 @@ class MenuDrawer extends StatelessWidget { ), ); } + + void _openCommit() => launchUrl( + Uri.parse('https://github.com/fleaflet/flutter_map/commit/$_commitSHA'), + ); } From cc6f0abd97b9a148354261ae02fdf0e56874d8f7 Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Wed, 28 May 2025 15:03:42 +0100 Subject: [PATCH 16/21] Fix documentation bug (fixes #2098) --- lib/src/layer/tile_layer/tile_display.dart | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/src/layer/tile_layer/tile_display.dart b/lib/src/layer/tile_layer/tile_display.dart index 12282be65..9aa5d2784 100644 --- a/lib/src/layer/tile_layer/tile_display.dart +++ b/lib/src/layer/tile_layer/tile_display.dart @@ -34,12 +34,14 @@ sealed class TileDisplay { /// Duration of the fade. Defaults to 100ms. Duration duration, - /// Opacity start value when a tile is faded in, default 1.0. The allowed - /// range is (0.0 - 1.0). + /// Opacity start value when a tile is faded in + /// + /// Defaults to 0. Must be in the range (inclusive) 0 - 1. double startOpacity, - /// Opacity start value when a tile is reloaded, default 1.0. Valid range is - /// (0.0 - 1.0). + /// Opacity start value when a tile is reloaded + /// + /// Defaults to 0. Must be in the range (inclusive) 0 - 1. double reloadStartOpacity, }) = FadeInTileDisplay._; @@ -56,7 +58,7 @@ sealed class TileDisplay { } } -/// Display the tile instantaneous. +/// Displays a tile instantaneously @immutable class InstantaneousTileDisplay extends TileDisplay { /// The optional opacity of the tile. @@ -80,7 +82,7 @@ class InstantaneousTileDisplay extends TileDisplay { int get hashCode => opacity.hashCode; } -/// A [TileDisplay] that should get faded in. +/// Displays a tile with a fade-in animation @immutable class FadeInTileDisplay extends TileDisplay { /// The duration of the fade in animation. From 3844f2e4fd3732c993925badb4aa0b1996ebeb2f Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Sun, 8 Jun 2025 22:07:59 +0100 Subject: [PATCH 17/21] Updated CHANGELOG --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21c3ad1f2..b6e614f1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,9 +12,10 @@ Contains the following user-affecting changes: - Added `Polyline/gonLayer.oneWorld` parameter - [#2069](https://github.com/fleaflet/flutter_map/pull/2069) for [#2067](https://github.com/fleaflet/flutter_map/issues/2067) - Added `ContainCameraLatitude` camera constraint - [#2073](https://github.com/fleaflet/flutter_map/pull/2073) for [#2071](https://github.com/fleaflet/flutter_map/issues/2071) - Added options to customize double-tap (drag) zoom gestures - [#2070](https://github.com/fleaflet/flutter_map/pull/2070) -- Added warning on usage of OpenStreetMap public tile servers with `TileLayer` - [#2074](https://github.com/fleaflet/flutter_map/pull/2074) +- 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) - Added `PolygonLayer.painterFillMethod` parameter & changed default fill methods - [#2081](https://github.com/fleaflet/flutter_map/pull/2081) -- Added simple built-in (but extendable) caching to `NetworkTileProvider` - [#2082](https://github.com/fleaflet/flutter_map/pull/2082) +- Added simple built-in (but extensible) caching to `NetworkTileProvider` - [#2082](https://github.com/fleaflet/flutter_map/pull/2082) +- Added `CircleLayer.optimizeRadiusInMeters` option to improve performance in some cases - [#2101](https://github.com/fleaflet/flutter_map/pull/2101) Contains the following user-affecting bug fixes: From 33e6783ecd43f3daa04b3209a478f0fa59820cfe Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Wed, 9 Jul 2025 22:45:01 +0100 Subject: [PATCH 18/21] Updated CHANGELOG --- CHANGELOG.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6e614f1d..87e10885a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ 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 you. For a full list of changes, please check the GitHub repository releases/tags. -## [8.2.0] - 2025/05/XX +## [8.2.0] - 2025/07/XX Contains the following user-affecting changes: @@ -15,7 +15,10 @@ Contains the following user-affecting changes: - 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) - Added `PolygonLayer.painterFillMethod` parameter & changed default fill methods - [#2081](https://github.com/fleaflet/flutter_map/pull/2081) - Added simple built-in (but extensible) caching to `NetworkTileProvider` - [#2082](https://github.com/fleaflet/flutter_map/pull/2082) +- Added aborting of obsolete in-flight HTTP requests to `NetworkTileProvider` - [#2082](https://github.com/fleaflet/flutter_map/pull/2082) - Added `CircleLayer.optimizeRadiusInMeters` option to improve performance in some cases - [#2101](https://github.com/fleaflet/flutter_map/pull/2101) +- Replace (with deprecation) `Polygon.labelPlacement` with more flexible and extensible `Polygon.labelPlacementCalculator`/`PolygonLabelPlacementCalculator` system - [#2102](https://github.com/fleaflet/flutter_map/pull/2102) +- 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) Contains the following user-affecting bug fixes: @@ -24,6 +27,8 @@ Contains the following user-affecting bug fixes: - 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) - Calculate `LayerHitResult.coordinate` correctly - [#2093](https://github.com/fleaflet/flutter_map/pull/2093) for [#2092](https://github.com/fleaflet/flutter_map/issues/2092) - 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) +- 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) +- 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) Contains the following meta changes to the package: @@ -36,6 +41,8 @@ Many thanks to these contributors (in no particular order): - @Quirille - @freekvandeven - @mbenoukaiss +- @ReinisSprogis +- ... and all the maintainers And an additional special thanks to @monsieurtanuki for investing so much of their time into this project recently - we appreciate it! @@ -48,6 +55,7 @@ Contains the following user-affecting bug fixes: Many thanks to these contributors (in no particular order): - @monsieurtanuki +- ... and all the maintainers ## [8.1.0] - 2025/02/25 @@ -64,6 +72,7 @@ Many thanks to these contributors (in no particular order): - @tlserver - @monsieurtanuki +- ... and all the maintainers ## [8.0.0] - 2025/02/02 From 3a5db30f70f680bcb496628933d14578be8d5f32 Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Thu, 10 Jul 2025 22:23:00 +0100 Subject: [PATCH 19/21] Update CHANGELOG --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87e10885a..1920dc381 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ 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 you. For a full list of changes, please check the GitHub repository releases/tags. -## [8.2.0] - 2025/07/XX +## [8.2.0] - 2025/07/10 Contains the following user-affecting changes: @@ -42,6 +42,7 @@ Many thanks to these contributors (in no particular order): - @freekvandeven - @mbenoukaiss - @ReinisSprogis +- @tidu090 - ... and all the maintainers And an additional special thanks to @monsieurtanuki for investing so much of their time into this project recently - we appreciate it! From a05af297402ad55b2a4c8394e5e1b6ced387f17e Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Thu, 10 Jul 2025 22:31:28 +0100 Subject: [PATCH 20/21] Move `TileLayer` warning logs out of constructor --- lib/src/layer/tile_layer/tile_layer.dart | 65 ++++++++++-------------- 1 file changed, 28 insertions(+), 37 deletions(-) diff --git a/lib/src/layer/tile_layer/tile_layer.dart b/lib/src/layer/tile_layer/tile_layer.dart index be7a7ae6c..95fa537a0 100644 --- a/lib/src/layer/tile_layer/tile_layer.dart +++ b/lib/src/layer/tile_layer/tile_layer.dart @@ -278,43 +278,6 @@ class TileLayer extends StatefulWidget { tileProvider = tileProvider ?? NetworkTileProvider(), tileUpdateTransformer = tileUpdateTransformer ?? TileUpdateTransformers.ignoreTapEvents { - // These log strong hints in debug mode, which is more visible to users than - // just documentation - they should only be used where there is a specific - // and large risk of the user doing something wrong. - if (kDebugMode && - urlTemplate != null && - urlTemplate!.contains('{s}.tile.openstreetmap.org')) { - Logger(printer: PrettyPrinter(methodCount: 0)).w( - '\x1B[1m\x1B[3mflutter_map\x1B[0m\nAvoid using subdomains with OSM\'s tile ' - 'server. Support may be become slow or be removed in future.\nSee ' - 'https://github.com/openstreetmap/operations/issues/737 for more info.', - ); - } - if (kDebugMode && - retinaMode == null && - urlTemplate != null && - urlTemplate!.contains('{r}')) { - Logger(printer: PrettyPrinter(methodCount: 0)).i( - '\x1B[1m\x1B[3mflutter_map\x1B[0m\nThe URL template includes a retina ' - "mode placeholder ('{r}') to retrieve native high-resolution\ntiles, " - 'which improve appearance especially on high-density displays.\n' - 'However, `TileLayer.retinaMode` was left unset, meaning flutter_map ' - 'will never retrieve these tiles.\nConsider using ' - '`RetinaMode.isHighDensity` to toggle this property automatically, ' - 'otherwise ensure\nit is set appropriately.\n' - 'See https://docs.fleaflet.dev/layers/tile-layer for more info.', - ); - } - if (kDebugMode && kIsWeb && tileProvider is NetworkTileProvider?) { - Logger(printer: PrettyPrinter(methodCount: 0)).i( - '\x1B[1m\x1B[3mflutter_map\x1B[0m\nConsider installing the official ' - "'flutter_map_cancellable_tile_provider' plugin for improved\n" - 'performance on the web.\nSee ' - 'https://pub.dev/packages/flutter_map_cancellable_tile_provider for ' - 'more info.', - ); - } - // If the tile provider doesn't define a User-Agent, we define it here. // This is so there's a convienient way for users to specifiy the agent // without always having to manually specify a tile provider and headers. @@ -433,6 +396,34 @@ See: _resetSub = widget.reset?.listen(_resetStreamHandler); _tileRangeCalculator = TileRangeCalculator(tileDimension: _tileDimension); _warnOpenStreetMapUrl(); + + // These log strong hints in debug mode, which is more visible to users than + // just documentation - they should only be used where there is a specific + // and large risk of the user doing something wrong. + if (kDebugMode && + widget.urlTemplate != null && + widget.urlTemplate!.contains('{s}.tile.openstreetmap.org')) { + Logger(printer: PrettyPrinter(methodCount: 0)).w( + '\x1B[1m\x1B[3mflutter_map\x1B[0m\nAvoid using subdomains with OSM\'s tile ' + 'server. Support may be become slow or be removed in future.\nSee ' + 'https://github.com/openstreetmap/operations/issues/737 for more info.', + ); + } + if (kDebugMode && + widget.resolvedRetinaMode == RetinaMode.disabled && + widget.urlTemplate != null && + widget.urlTemplate!.contains('{r}')) { + Logger(printer: PrettyPrinter(methodCount: 0)).i( + '\x1B[1m\x1B[3mflutter_map\x1B[0m\nThe URL template includes a retina ' + "mode placeholder ('{r}') to retrieve native high-resolution\ntiles, " + 'which improve appearance especially on high-density displays.\n' + 'However, `TileLayer.retinaMode` was left unset, meaning flutter_map ' + 'will never retrieve these tiles.\nConsider using ' + '`RetinaMode.isHighDensity` to toggle this property automatically, ' + 'otherwise ensure\nit is set appropriately.\n' + 'See https://docs.fleaflet.dev/layers/tile-layer for more info.', + ); + } } // This is called on every map movement so we should avoid expensive logic From 894f636d1727df099bf1636fdccec9006240fe0d Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Thu, 10 Jul 2025 22:33:13 +0100 Subject: [PATCH 21/21] Remove faulty retina mode warning --- lib/src/layer/tile_layer/tile_layer.dart | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/lib/src/layer/tile_layer/tile_layer.dart b/lib/src/layer/tile_layer/tile_layer.dart index 95fa537a0..3dcba4c0f 100644 --- a/lib/src/layer/tile_layer/tile_layer.dart +++ b/lib/src/layer/tile_layer/tile_layer.dart @@ -409,21 +409,6 @@ See: 'https://github.com/openstreetmap/operations/issues/737 for more info.', ); } - if (kDebugMode && - widget.resolvedRetinaMode == RetinaMode.disabled && - widget.urlTemplate != null && - widget.urlTemplate!.contains('{r}')) { - Logger(printer: PrettyPrinter(methodCount: 0)).i( - '\x1B[1m\x1B[3mflutter_map\x1B[0m\nThe URL template includes a retina ' - "mode placeholder ('{r}') to retrieve native high-resolution\ntiles, " - 'which improve appearance especially on high-density displays.\n' - 'However, `TileLayer.retinaMode` was left unset, meaning flutter_map ' - 'will never retrieve these tiles.\nConsider using ' - '`RetinaMode.isHighDensity` to toggle this property automatically, ' - 'otherwise ensure\nit is set appropriately.\n' - 'See https://docs.fleaflet.dev/layers/tile-layer for more info.', - ); - } } // This is called on every map movement so we should avoid expensive logic