From d590be261f81bc4cff61397b54cc8bd0fea92dad Mon Sep 17 00:00:00 2001 From: Leon Date: Tue, 3 Jun 2025 09:44:10 -0300 Subject: [PATCH 01/14] feat: parameters to use marker in meters --- lib/src/layer/marker_layer/marker.dart | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/src/layer/marker_layer/marker.dart b/lib/src/layer/marker_layer/marker.dart index 764770342..95358cfc9 100644 --- a/lib/src/layer/marker_layer/marker.dart +++ b/lib/src/layer/marker_layer/marker.dart @@ -48,6 +48,18 @@ class Marker { /// marker. Use a widget inside [child] to perform this. final bool? rotate; + /// Parameter to enable or not the feature to use markers dimensions in meters. + /// + /// A good way to use that feature is using a LayoutBuilder and building according the + /// maxHeight and minWidth values. + final bool useSizeInMeters; + + /// TODO: Documentation + final double? maxWidthUsingMetersPixels; + final double? maxHeightUsingMetersPixels; + final double? minWidthUsingMetersPixels; + final double? minHeightUsingMetersPixels; + /// Creates a container for a [child] widget located at a geographic coordinate /// [point] /// @@ -61,6 +73,11 @@ class Marker { this.height = 30, this.alignment, this.rotate, + this.useSizeInMeters = false, + this.maxWidthUsingMetersPixels, + this.maxHeightUsingMetersPixels, + this.minHeightUsingMetersPixels, + this.minWidthUsingMetersPixels, }); /// Returns the alignment of a [width]x[height] rectangle by [left]x[top] pixels. From 3bc637f73d74d9f97ba3b4862a72a2b782a314f9 Mon Sep 17 00:00:00 2001 From: Leon Date: Tue, 3 Jun 2025 10:14:08 -0300 Subject: [PATCH 02/14] refactor: change positioned left, top, bottom and right variables creating that only in the needed function --- lib/src/layer/marker_layer/marker_layer.dart | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/src/layer/marker_layer/marker_layer.dart b/lib/src/layer/marker_layer/marker_layer.dart index fe4693d46..32ed910d0 100644 --- a/lib/src/layer/marker_layer/marker_layer.dart +++ b/lib/src/layer/marker_layer/marker_layer.dart @@ -47,19 +47,19 @@ class MarkerLayer extends StatelessWidget { child: Stack( children: (List markers) sync* { for (final m in markers) { - // Resolve real alignment - // TODO: maybe just using Size, Offset, and Rect? - final left = 0.5 * m.width * ((m.alignment ?? alignment).x + 1); - final top = 0.5 * m.height * ((m.alignment ?? alignment).y + 1); - final right = m.width - left; - final bottom = m.height - top; - // Perform projection final pxPoint = map.projectAtZoom(m.point); Positioned? getPositioned(double worldShift) { final shiftedX = pxPoint.dx + worldShift; + // Resolve real alignment + // TODO: maybe just using Size, Offset, and Rect? + final left = 0.5 * m.width * ((m.alignment ?? alignment).x + 1); + final top = 0.5 * m.height * ((m.alignment ?? alignment).y + 1); + final right = m.width - left; + final bottom = m.height - top; + // Cull if out of bounds if (!map.pixelBounds.overlaps( Rect.fromPoints( From f1f8394807639112da5920e5f01eb4f0712e2c42 Mon Sep 17 00:00:00 2001 From: Leon Date: Tue, 3 Jun 2025 10:56:29 -0300 Subject: [PATCH 03/14] feat: width and height according the using meters implementation --- lib/src/layer/marker_layer/marker_layer.dart | 51 +++++++++++++++++--- 1 file changed, 45 insertions(+), 6 deletions(-) diff --git a/lib/src/layer/marker_layer/marker_layer.dart b/lib/src/layer/marker_layer/marker_layer.dart index 32ed910d0..91d230940 100644 --- a/lib/src/layer/marker_layer/marker_layer.dart +++ b/lib/src/layer/marker_layer/marker_layer.dart @@ -53,12 +53,51 @@ class MarkerLayer extends StatelessWidget { Positioned? getPositioned(double worldShift) { final shiftedX = pxPoint.dx + worldShift; + double height = m.height; + double width = m.width; + + if (m.useSizeInMeters) { + final basePoint = m.point; + final baseOffset = map.getOffsetFromOrigin(basePoint); + final rHeight = + const Distance().offset(basePoint, height / 2, 0); + final rWidth = const Distance().offset(basePoint, width / 2, 0); + + height = + (baseOffset - map.getOffsetFromOrigin(rHeight)).distance * + 2; + width = + (baseOffset - map.getOffsetFromOrigin(rWidth)).distance * 2; + + final maxHeightUsingMetersPixels = m.maxHeightUsingMetersPixels; + final maxWidthUsingMetersPixels = m.maxWidthUsingMetersPixels; + if (maxHeightUsingMetersPixels != null && + height > maxHeightUsingMetersPixels) { + height = maxHeightUsingMetersPixels; + } + if (maxWidthUsingMetersPixels != null && + width > maxWidthUsingMetersPixels) { + width = maxWidthUsingMetersPixels; + } + + final minHeightUsingMetersPixels = m.minHeightUsingMetersPixels; + final minWidthUsingMetersPixels = m.minWidthUsingMetersPixels; + if (minHeightUsingMetersPixels != null && + height < minHeightUsingMetersPixels) { + height = minHeightUsingMetersPixels; + } + if (minWidthUsingMetersPixels != null && + width < minWidthUsingMetersPixels) { + width = minWidthUsingMetersPixels; + } + } + // Resolve real alignment // TODO: maybe just using Size, Offset, and Rect? - final left = 0.5 * m.width * ((m.alignment ?? alignment).x + 1); - final top = 0.5 * m.height * ((m.alignment ?? alignment).y + 1); - final right = m.width - left; - final bottom = m.height - top; + final left = 0.5 * width * ((m.alignment ?? alignment).x + 1); + final top = 0.5 * height * ((m.alignment ?? alignment).y + 1); + final right = width - left; + final bottom = height - top; // Cull if out of bounds if (!map.pixelBounds.overlaps( @@ -77,8 +116,8 @@ class MarkerLayer extends StatelessWidget { return Positioned( key: m.key, - width: m.width, - height: m.height, + width: width, + height: height, left: shiftedLocalPoint.dx - right, top: shiftedLocalPoint.dy - bottom, child: (m.rotate ?? rotate) From 5f88ba825fdd514c0703f063730f31a4dec15ff5 Mon Sep 17 00:00:00 2001 From: Leon Date: Tue, 3 Jun 2025 11:34:46 -0300 Subject: [PATCH 04/14] feat: marker using size in meters example --- example/lib/pages/markers.dart | 44 ++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/example/lib/pages/markers.dart b/example/lib/pages/markers.dart index 2f652096b..d71a0d3d7 100644 --- a/example/lib/pages/markers.dart +++ b/example/lib/pages/markers.dart @@ -1,3 +1,5 @@ +import 'dart:math'; + import 'package:flutter/material.dart'; import 'package:flutter_map/flutter_map.dart'; import 'package:flutter_map_example/misc/tile_providers.dart'; @@ -117,8 +119,11 @@ class _MarkerPageState extends State { Flexible( child: FlutterMap( options: MapOptions( - initialCenter: const LatLng(51.5, -0.09), - initialZoom: 5, + initialCenter: const LatLng( + 51.51868093513547, + -0.12835376940892318, + ), + initialZoom: 15, onTap: (_, p) => setState(() => customMarkers.add(buildPin(p))), interactionOptions: const InteractionOptions( flags: ~InteractiveFlag.doubleTapZoom, @@ -167,6 +172,41 @@ class _MarkerPageState extends State { rotate: counterRotate, alignment: selectedAlignment, ), + MarkerLayer( + markers: [ + Marker( + point: const LatLng( + 51.51868093513547, + -0.12835376940892318, + ), + height: 20, + width: 20, + maxHeightUsingMetersPixels: 200, + maxWidthUsingMetersPixels: 200, + child: LayoutBuilder( + builder: (context, constraints) { + final minDimension = min( + constraints.maxHeight, + constraints.maxWidth, + ); + + return Transform.scale( + scale: minDimension / 30, + child: const SizedBox( + width: 30, + height: 30, + child: Icon( + Icons.map, + color: Colors.amber, + ), + ), + ); + }, + ), + useSizeInMeters: true, + ), + ], + ), ], ), ), From dbb1f99b6297d197054efcb12ae4091f3e467da1 Mon Sep 17 00:00:00 2001 From: Leon Date: Tue, 3 Jun 2025 12:10:10 -0300 Subject: [PATCH 05/14] feat: documentation of the new parameters --- lib/src/layer/marker_layer/marker.dart | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/src/layer/marker_layer/marker.dart b/lib/src/layer/marker_layer/marker.dart index 95358cfc9..9e724c987 100644 --- a/lib/src/layer/marker_layer/marker.dart +++ b/lib/src/layer/marker_layer/marker.dart @@ -54,10 +54,24 @@ class Marker { /// maxHeight and minWidth values. final bool useSizeInMeters; - /// TODO: Documentation + /// Parameter to control the max width in pixels of the marker region when the parameter + /// [useSizeInMeters] is enabled. That size is optional and when existent will limited + /// the marker size pixel width final double? maxWidthUsingMetersPixels; + + /// Parameter to control the max height in pixels of the marker region when the parameter + /// [useSizeInMeters] is enabled. That size is optional and when existent will limited + /// the marker size pixel height final double? maxHeightUsingMetersPixels; + + /// Parameter to control the min width in pixels of the marker region when the parameter + /// [useSizeInMeters] is enabled. That size is optional and when existent will be the + /// minimal width for the marker pixel region final double? minWidthUsingMetersPixels; + + /// Parameter to control the min height in pixels of the marker region when the parameter + /// [useSizeInMeters] is enabled. That size is optional and when existent will be the + /// minimal height for the marker pixel region final double? minHeightUsingMetersPixels; /// Creates a container for a [child] widget located at a geographic coordinate From 35e1f11787777c259538a5659bcf4c6e2265194b Mon Sep 17 00:00:00 2001 From: Leon Date: Mon, 9 Jun 2025 13:33:44 -0300 Subject: [PATCH 06/14] refactor: marker parameters to control the min and max height and width in a box contraint to avoid so many parameters --- example/lib/pages/markers.dart | 6 ++-- lib/src/layer/marker_layer/marker.dart | 28 +++------------- lib/src/layer/marker_layer/marker_layer.dart | 35 +++++++++----------- 3 files changed, 24 insertions(+), 45 deletions(-) diff --git a/example/lib/pages/markers.dart b/example/lib/pages/markers.dart index d71a0d3d7..22dad83a1 100644 --- a/example/lib/pages/markers.dart +++ b/example/lib/pages/markers.dart @@ -181,8 +181,10 @@ class _MarkerPageState extends State { ), height: 20, width: 20, - maxHeightUsingMetersPixels: 200, - maxWidthUsingMetersPixels: 200, + boxConstraintsUsingMetersInPixels: const BoxConstraints( + maxHeight: 200, + maxWidth: 200, + ), child: LayoutBuilder( builder: (context, constraints) { final minDimension = min( diff --git a/lib/src/layer/marker_layer/marker.dart b/lib/src/layer/marker_layer/marker.dart index 9e724c987..f66a8c227 100644 --- a/lib/src/layer/marker_layer/marker.dart +++ b/lib/src/layer/marker_layer/marker.dart @@ -54,25 +54,10 @@ class Marker { /// maxHeight and minWidth values. final bool useSizeInMeters; - /// Parameter to control the max width in pixels of the marker region when the parameter - /// [useSizeInMeters] is enabled. That size is optional and when existent will limited - /// the marker size pixel width - final double? maxWidthUsingMetersPixels; - - /// Parameter to control the max height in pixels of the marker region when the parameter - /// [useSizeInMeters] is enabled. That size is optional and when existent will limited - /// the marker size pixel height - final double? maxHeightUsingMetersPixels; - - /// Parameter to control the min width in pixels of the marker region when the parameter - /// [useSizeInMeters] is enabled. That size is optional and when existent will be the - /// minimal width for the marker pixel region - final double? minWidthUsingMetersPixels; - - /// Parameter to control the min height in pixels of the marker region when the parameter - /// [useSizeInMeters] is enabled. That size is optional and when existent will be the - /// minimal height for the marker pixel region - final double? minHeightUsingMetersPixels; + /// Parameter to control the box size when the parameter [useSizeInMeters] is enabled. + /// That BoxConstraints is optional and when exists control the minimal and maximal size + /// in pixels of that region created by the map visible region in meters. + final BoxConstraints? boxConstraintsUsingMetersInPixels; /// Creates a container for a [child] widget located at a geographic coordinate /// [point] @@ -88,10 +73,7 @@ class Marker { this.alignment, this.rotate, this.useSizeInMeters = false, - this.maxWidthUsingMetersPixels, - this.maxHeightUsingMetersPixels, - this.minHeightUsingMetersPixels, - this.minWidthUsingMetersPixels, + this.boxConstraintsUsingMetersInPixels, }); /// Returns the alignment of a [width]x[height] rectangle by [left]x[top] pixels. diff --git a/lib/src/layer/marker_layer/marker_layer.dart b/lib/src/layer/marker_layer/marker_layer.dart index 91d230940..6489829e0 100644 --- a/lib/src/layer/marker_layer/marker_layer.dart +++ b/lib/src/layer/marker_layer/marker_layer.dart @@ -69,26 +69,21 @@ class MarkerLayer extends StatelessWidget { width = (baseOffset - map.getOffsetFromOrigin(rWidth)).distance * 2; - final maxHeightUsingMetersPixels = m.maxHeightUsingMetersPixels; - final maxWidthUsingMetersPixels = m.maxWidthUsingMetersPixels; - if (maxHeightUsingMetersPixels != null && - height > maxHeightUsingMetersPixels) { - height = maxHeightUsingMetersPixels; - } - if (maxWidthUsingMetersPixels != null && - width > maxWidthUsingMetersPixels) { - width = maxWidthUsingMetersPixels; - } - - final minHeightUsingMetersPixels = m.minHeightUsingMetersPixels; - final minWidthUsingMetersPixels = m.minWidthUsingMetersPixels; - if (minHeightUsingMetersPixels != null && - height < minHeightUsingMetersPixels) { - height = minHeightUsingMetersPixels; - } - if (minWidthUsingMetersPixels != null && - width < minWidthUsingMetersPixels) { - width = minWidthUsingMetersPixels; + final boxConstraintsUsingMetersInPixels = + m.boxConstraintsUsingMetersInPixels; + if (boxConstraintsUsingMetersInPixels != null) { + if (height > boxConstraintsUsingMetersInPixels.maxHeight) { + height = boxConstraintsUsingMetersInPixels.maxHeight; + } + if (width > boxConstraintsUsingMetersInPixels.maxWidth) { + width = boxConstraintsUsingMetersInPixels.maxWidth; + } + if (height < boxConstraintsUsingMetersInPixels.minHeight) { + height = boxConstraintsUsingMetersInPixels.minHeight; + } + if (width < boxConstraintsUsingMetersInPixels.minWidth) { + width = boxConstraintsUsingMetersInPixels.minWidth; + } } } From 481ea05d0df19adecaee25d94f9c63b8b858764f Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Tue, 30 Jun 2026 22:36:00 +0100 Subject: [PATCH 07/14] Collapse `useDimensionsInMeters` & `meterToPixelSizeConstraints` into one property --- example/lib/pages/markers.dart | 5 +-- lib/src/layer/marker_layer/marker.dart | 38 ++++++++++++-------- lib/src/layer/marker_layer/marker_layer.dart | 13 ++++--- 3 files changed, 33 insertions(+), 23 deletions(-) diff --git a/example/lib/pages/markers.dart b/example/lib/pages/markers.dart index 3f1ee018e..65b413ccb 100644 --- a/example/lib/pages/markers.dart +++ b/example/lib/pages/markers.dart @@ -1,5 +1,3 @@ -import 'dart:math'; - import 'package:flutter/material.dart'; import 'package:flutter_map/flutter_map.dart'; import 'package:flutter_map_example/misc/tile_providers.dart'; @@ -172,8 +170,7 @@ class _MarkerPageState extends State { ), height: 1000, width: 1000, - useDimensionsInMeters: true, - meterToPixelSizeConstraints: const BoxConstraints( + useDimensionsInMeters: const BoxConstraints( minHeight: 30, minWidth: 30, ), diff --git a/lib/src/layer/marker_layer/marker.dart b/lib/src/layer/marker_layer/marker.dart index f81866fb4..b3566c809 100644 --- a/lib/src/layer/marker_layer/marker.dart +++ b/lib/src/layer/marker_layer/marker.dart @@ -22,24 +22,32 @@ class Marker { /// The [Marker] itself is not a widget. final Widget child; - /// Width of child, in pixels (or meters if [useDimensionsInMeters] is set). + /// Width of child, in pixels (unless [useDimensionsInMeters] is set). final double width; - /// Width of child, in pixels (or meters if [useDimensionsInMeters] is set). + /// Width of child, in pixels (unless [useDimensionsInMeters] is set). final double height; - /// Whether to treat [width] and [height] as a number of meters. + /// Whether to treat [width] and [height] as meters, with optional pixel size + /// constraints. /// - /// If this is `true`, the child can use [SizedBox.expand] to expand itself to - /// the available size. It can also use a [LayoutBuilder] to obtain its - /// calculated true size, if necessary. + /// If `null` (as default), [width] and [height] are specified in pixels. /// - /// See also [meterToPixelSizeConstraints]. - final bool useDimensionsInMeters; - - /// Optional constraints on the child's size in pixels, when - /// [useDimensionsInMeters] is enabled. - final BoxConstraints? meterToPixelSizeConstraints; + /// If set to [BoxConstraints], [width] and [height] are specified in meters. + /// They will constrain size of the marker on the screen in pixels. The + /// constraints must have finite minimum dimensions. + /// + /// Set an empty [BoxConstraints] to display the marker as its true + /// geographical size (without constraints): + /// + /// ```dart + /// useDimensionsInMeters: const BoxConstraints(), + /// ``` + /// + /// When using geographical sizing, the child can use [SizedBox.expand] to + /// expand itself to the available size. [LayoutBuilder] can be used to obtain + /// its calculated screen size, if necessary. + final BoxConstraints? useDimensionsInMeters; /// Alignment of the marker relative to the normal center at [point]. /// @@ -72,13 +80,13 @@ class Marker { required this.child, this.width = 30, this.height = 30, - this.useDimensionsInMeters = false, - this.meterToPixelSizeConstraints, + this.useDimensionsInMeters, this.alignment, this.rotate, }); - /// Returns the alignment of a [width]x[height] rectangle by [left]x[top] pixels. + /// Returns the alignment of a [width]x[height] rectangle by [left]x[top] + /// pixels. static Alignment computePixelAlignment({ required final double width, required final double height, diff --git a/lib/src/layer/marker_layer/marker_layer.dart b/lib/src/layer/marker_layer/marker_layer.dart index 023f46fff..33be25fc2 100644 --- a/lib/src/layer/marker_layer/marker_layer.dart +++ b/lib/src/layer/marker_layer/marker_layer.dart @@ -109,7 +109,8 @@ class _MarkerLayerState extends State { } (double, double) _getDimensionsInPixels(Marker marker) { - if (!marker.useDimensionsInMeters) return (marker.width, marker.height); + final constraints = marker.useDimensionsInMeters; + if (constraints == null) return (marker.width, marker.height); final camera = MapCamera.of(context); @@ -141,10 +142,14 @@ class _MarkerLayerState extends State { width = _pixelsPerMeter! * marker.width; height = _pixelsPerMeter! * marker.height; } - if (marker.meterToPixelSizeConstraints case final c?) { - return (c.constrainWidth(width), c.constrainHeight(height)); + + if (!constraints.minWidth.isFinite || !constraints.minHeight.isFinite) { + throw RangeError('`Marker.useSizeInMeters` must have finite minimums'); } - return (width, height); + return ( + constraints.constrainWidth(width), + constraints.constrainHeight(height) + ); } @override From d86b9ba67af1739917ac9ab482edbcb1925a64f9 Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Wed, 1 Jul 2026 15:28:37 +0100 Subject: [PATCH 08/14] Fix support for Flutter 3.27 --- example/lib/pages/markers.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/lib/pages/markers.dart b/example/lib/pages/markers.dart index 65b413ccb..6426550de 100644 --- a/example/lib/pages/markers.dart +++ b/example/lib/pages/markers.dart @@ -177,7 +177,7 @@ class _MarkerPageState extends State { child: SizedBox.expand( child: LayoutBuilder( builder: (context, constraints) => DecoratedBox( - decoration: BoxDecoration(border: BoxBorder.all()), + decoration: BoxDecoration(border: Border.all()), ), ), ), From f2fe8f0916692ca63f5182693f1b16ba959a457f Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Wed, 1 Jul 2026 15:28:54 +0100 Subject: [PATCH 09/14] Minor fixes to workflows --- .github/workflows/branch.yml | 16 ++++++++-------- .github/workflows/master.yml | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml index f19de9c46..5bf1bdab6 100644 --- a/.github/workflows/branch.yml +++ b/.github/workflows/branch.yml @@ -1,7 +1,7 @@ name: "Branch & PR" on: push: - branches: [ "!master" ] + branches: ["!master"] pull_request: workflow_dispatch: @@ -49,7 +49,7 @@ jobs: strategy: fail-fast: false matrix: - sdk: [ "3.27.0", "" ] + sdk: ["3.27.0", ""] steps: - name: Checkout Repository uses: actions/checkout@v7 @@ -72,7 +72,7 @@ jobs: strategy: fail-fast: false matrix: - sdk: [ "3.27.0", "" ] + sdk: ["3.27.0", ""] defaults: run: working-directory: ./example @@ -91,7 +91,7 @@ jobs: flutter-version: ${{ matrix.sdk }} cache: true - name: Build Android Application - run: flutter build apk --dart-define=COMMIT_SHA=${{ github.sha }} --dart-define=flutter.flutter_map.unblockOSM="${{ secrets.UNBLOCK_OSM }}" + run: flutter build apk --dart-define=COMMIT_SHA=${{ github.sha }} - name: Archive Artifact if: ${{ matrix.sdk == '' }} uses: actions/upload-artifact@v7 @@ -106,7 +106,7 @@ jobs: strategy: fail-fast: false matrix: - sdk: [ "3.27.0", "" ] + sdk: ["3.27.0", ""] defaults: run: working-directory: ./example @@ -119,7 +119,7 @@ jobs: flutter-version: ${{ matrix.sdk }} cache: true - name: Build Windows Application - run: flutter build windows --dart-define=COMMIT_SHA=${{ github.sha }} --dart-define=flutter.flutter_map.unblockOSM="${{ secrets.UNBLOCK_OSM }}" + run: flutter build windows --dart-define=COMMIT_SHA=${{ github.sha }} - name: Install Inno Setup if: ${{ matrix.sdk == '' }} run: choco install innosetup --yes --no-progress @@ -141,7 +141,7 @@ jobs: strategy: fail-fast: false matrix: - sdk: [ "3.27.0", "" ] + sdk: ["3.27.0", ""] defaults: run: working-directory: ./example @@ -154,7 +154,7 @@ jobs: flutter-version: ${{ matrix.sdk }} cache: true - name: Build Web Application - run: flutter build web --wasm --dart-define=COMMIT_SHA=${{ github.sha }} --dart-define=flutter.flutter_map.unblockOSM="${{ secrets.UNBLOCK_OSM }}" + run: flutter build web --wasm --dart-define=COMMIT_SHA=${{ github.sha }} - name: Archive Artifact uses: actions/upload-artifact@v7 if: ${{ matrix.sdk == '' }} diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 107d588ae..51f31b949 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -31,7 +31,7 @@ jobs: build-android: name: "Build Android Example App" runs-on: ubuntu-latest - needs: [ run-tests ] + needs: [run-tests] if: github.repository == 'fleaflet/flutter_map' defaults: run: @@ -44,14 +44,14 @@ jobs: with: distribution: "temurin" java-version: "21" - cache: 'gradle' + cache: "gradle" - name: Setup Flutter Environment uses: subosito/flutter-action@v2 with: channel: "stable" cache: true - name: Build Android Application - run: flutter build apk --dart-define=COMMIT_SHA=${{ github.sha }} --dart-define=flutter.flutter_map.unblockOSM="${{ secrets.UNBLOCK_OSM }}" + run: flutter build apk --dart-define=COMMIT_SHA=${{ github.sha }} - name: Archive Artifact uses: actions/upload-artifact@v7 with: @@ -62,7 +62,7 @@ jobs: build-windows: name: "Build Windows Example App" runs-on: windows-latest - needs: [ run-tests ] + needs: [run-tests] if: github.repository == 'fleaflet/flutter_map' defaults: run: @@ -75,7 +75,7 @@ jobs: with: cache: true - name: Build Windows Application - run: flutter build windows --dart-define=COMMIT_SHA=${{ github.sha }} --dart-define=flutter.flutter_map.unblockOSM="${{ secrets.UNBLOCK_OSM }}" + run: flutter build windows --dart-define=COMMIT_SHA=${{ github.sha }} - name: Install Inno Setup run: choco install innosetup --yes --no-progress - name: Create Windows Application Installer @@ -91,7 +91,7 @@ jobs: build-web: name: "Build & Deploy Web Example App" runs-on: ubuntu-latest - needs: [ run-tests ] + needs: [run-tests] if: github.repository == 'fleaflet/flutter_map' defaults: run: @@ -105,7 +105,7 @@ jobs: channel: "stable" cache: true - name: Build Web Application - run: flutter build web --wasm --dart-define=COMMIT_SHA=${{ github.sha }} --dart-define=flutter.flutter_map.unblockOSM="${{ secrets.UNBLOCK_OSM }}" + run: flutter build web --wasm --dart-define=COMMIT_SHA=${{ github.sha }} - name: Archive Artifact uses: actions/upload-artifact@v7 with: @@ -118,4 +118,4 @@ jobs: repoToken: "${{ secrets.GITHUB_TOKEN }}" firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_FLEAFLET }}" channelId: live - projectId: fleaflet-firebase \ No newline at end of file + projectId: fleaflet-firebase From d26597880a81af0f4f5b5c4c3ca79747f5abae73 Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Wed, 1 Jul 2026 15:34:31 +0100 Subject: [PATCH 10/14] Bump Windows workflow 3.29 matrix verison to 3.32 to attempt to resolve failures --- .github/workflows/branch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml index 5bf1bdab6..927fb6d0a 100644 --- a/.github/workflows/branch.yml +++ b/.github/workflows/branch.yml @@ -106,7 +106,7 @@ jobs: strategy: fail-fast: false matrix: - sdk: ["3.27.0", ""] + sdk: ["3.32.0", ""] defaults: run: working-directory: ./example From 4f0c90d8f3d92608a9fb37f6f148947e8f63a4a7 Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Wed, 1 Jul 2026 15:35:41 +0100 Subject: [PATCH 11/14] Revert changes to initial position on markers demo page --- example/lib/pages/markers.dart | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/example/lib/pages/markers.dart b/example/lib/pages/markers.dart index 6426550de..54b6702a2 100644 --- a/example/lib/pages/markers.dart +++ b/example/lib/pages/markers.dart @@ -117,11 +117,8 @@ class _MarkerPageState extends State { Flexible( child: FlutterMap( options: MapOptions( - initialCenter: const LatLng( - 51.51868093513547, - -0.12835376940892318, - ), - initialZoom: 15, + initialCenter: const LatLng(51.5, -0.09), + initialZoom: 5, onTap: (_, p) => setState(() => customMarkers.add(buildPin(p))), interactionOptions: const InteractionOptions( flags: ~InteractiveFlag.doubleTapZoom, From c8ca512e5451ebce29c079f1a0bed6d42b996531 Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Wed, 1 Jul 2026 15:36:19 +0100 Subject: [PATCH 12/14] Minor typo fix --- lib/src/layer/marker_layer/marker.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/layer/marker_layer/marker.dart b/lib/src/layer/marker_layer/marker.dart index b3566c809..2f27696c5 100644 --- a/lib/src/layer/marker_layer/marker.dart +++ b/lib/src/layer/marker_layer/marker.dart @@ -25,7 +25,7 @@ class Marker { /// Width of child, in pixels (unless [useDimensionsInMeters] is set). final double width; - /// Width of child, in pixels (unless [useDimensionsInMeters] is set). + /// Height of child, in pixels (unless [useDimensionsInMeters] is set). final double height; /// Whether to treat [width] and [height] as meters, with optional pixel size From aab420ed04d59942d2186f70974efff1232c5016 Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Wed, 1 Jul 2026 15:48:32 +0100 Subject: [PATCH 13/14] Bump Windows workflow 3.32 matrix verison to 3.39 to attempt to resolve failures --- .github/workflows/branch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml index 927fb6d0a..7ab29d854 100644 --- a/.github/workflows/branch.yml +++ b/.github/workflows/branch.yml @@ -106,7 +106,7 @@ jobs: strategy: fail-fast: false matrix: - sdk: ["3.32.0", ""] + sdk: ["3.39.0", ""] defaults: run: working-directory: ./example From 5c060c09ad992069a2d20560c6fd6bf49a912248 Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Wed, 1 Jul 2026 15:50:22 +0100 Subject: [PATCH 14/14] Bump Windows workflow 3.39 matrix verison to 3.41 to attempt to resolve failures --- .github/workflows/branch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml index 7ab29d854..7410f9e9c 100644 --- a/.github/workflows/branch.yml +++ b/.github/workflows/branch.yml @@ -106,7 +106,7 @@ jobs: strategy: fail-fast: false matrix: - sdk: ["3.39.0", ""] + sdk: ["3.41.0", ""] # Can't use 3.27 on github because windows-latest is incompatible now defaults: run: working-directory: ./example