# flutter_map_animations 0.11.0

Animation utilities for markers and controls of the flutter_map package.




## Installing
```
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add flutter_map_animations
```
Published: 2026-10-19T12:31:58.513195Z
Expected archive SHA-256: a524e59b077d24bbed2c76bfd12836f8915da0ecdba46b06459af824e72c8f17

Available in cache; verification: upstream_checksum
## Direct dependencies
- flutter: map[sdk:flutter]
- flutter_map: >=8.3.0 <9.0.0
- latlong2: >=0.9.1 <0.11.0

## Package README (untrusted upstream documentation)
# Flutter Map Animations

[![Pub Version (including pre-releases)](https://img.shields.io/pub/v/flutter_map_animations?include_prereleases)][pub-package]

Animation utility for the [flutter_map][pub-flutter-map] package.

[Try the example app][example]

# Table of Contents

- [Documentation](#documentation)
    - [AnimatedMapController](#animatedmapcontroller)
        - [Animated Movement](#animated-movement)
    - [AnimatedMarkerLayer & AnimatedMarker](#animatedmarkerlayer--animatedmarker)
- [Migration Guide](#migration-guide)
    - [v0.5.0](#v050)
    - [v0.4.0](#v040)
- [Contributors](#contributors)

# Documentation

## AnimatedMapController

Just create an `AnimatedMapController` and you're good to go:

```dart
class _MyWidgetState extends State<MyWidget> with TickerProviderStateMixin {
    late final _animatedMapController = AnimatedMapController(vsync: this);

    // ...
}
```

You can specify globally the animation's `duration`, `curve` and if previous animations should be stopped with `cancelPreviousAnimations`:

```dart
AnimatedMapController(
    vsync: this,
    duration: const Duration(milliseconds: 500),
    curve: Curves.easeInOut,
    cancelPreviousAnimations: true, // Default to false
);
```

And add it to your `FlutterMap` widget:

```dart
FlutterMap(
    mapController: _animatedMapController.mapController,
    // ...
)
```

### Animated Movement

| Rotation | Zoom | Center on point |
| ----- | ----- | ----- |
| <img src="https://github.com/TesteurManiak/flutter_map_animations/blob/main/gifs/rotate.gif?raw=true" height="400"> | <img src="https://github.com/TesteurManiak/flutter_map_animations/blob/main/gifs/zoom.gif?raw=true" height="400"> | <img src="https://github.com/TesteurManiak/flutter_map_animations/blob/main/gifs/center-on-point.gif?raw=true" height="400"> |

Check the [`AnimatedMapController` API][animated-map-controller] for more!

## AnimatedMarkerLayer & AnimatedMarker

| AnimatedMarker |
| ----- |
| <img src="https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/main/gifs/animated-marker.gif" height="400"> |

```dart
FlutterMap(
    mapController: _animatedMapController.mapController,
    children: [
        TileLayer(
            urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
            userAgentPackageName: 'com.example.app',
        ),
        AnimatedMarkerLayer(
            markers: [
                AnimatedMarker(
                    point: LatLng(51.509364, -0.128928),
                    builder: (_, animation) {
                        final size = 50.0 * animation.value;
                        return Icon(
                            Icons.location_on,
                            size: size,
                        );
                    },
                ),
            ],
        ),
    ],
)
```

# Migration Guide

## v0.5.0

With [flutter_map v6][flutter-map-v6] some parameters have been removed or renamed:

* `AnimatedMarker.rotateOrigin`, `AnimatedMarker.anchorPos` have been removed
* `AnimatedMarker.rotateAlignment` has been renamed to `AnimatedMarker.alignment`
* `AnimatedMarkerLayer.rotateOrigin`, `AnimatedMarkerLayer.anchorPos` have been removed
* `AnimatedMarkerLayer.rotateAlignment` has been renamed to `AnimatedMarkerLayer.alignment`

## v0.4.0

* With [flutter_map v5][flutter-map-v5] it's not possible anymore to extend `MapControllerImpl` which was used to use the `AnimatedMapController` directly as a `MapController` in the `FlutterMap` widget. Now an instance of `MapController` is created internally or can be passed as a parameter to the `AnimatedMapController` constructor. You can access it with the `mapController` getter:

```dart
late final _animatedMapController = AnimatedMapController(vsync: this);

@override
Widget build(BuildContext context) {
    return FlutterMap(
        mapController: _animatedMapController.mapController,
        // ...
    );
}
```

# Contributors

<!-- readme: contributors -start -->
<table>
<tr>
    <td align="center">
        <a href="https://github.com/TesteurManiak">
            <img src="https://avatars.githubusercontent.com/u/14369698?v=4" width="100;" alt="TesteurManiak"/>
            <br />
            <sub><b>Guillaume Roux</b></sub>
        </a>
    </td>
    <td align="center">
        <a href="https://github.com/JaffaKetchup">
            <img src="https://avatars.githubusercontent.com/u/58115698?v=4" width="100;" alt="JaffaKetchup"/>
            <br />
            <sub><b>Luka S</b></sub>
        </a>
    </td>
    <td align="center">
        <a href="https://github.com/rorystephenson">
            <img src="https://avatars.githubusercontent.com/u/3683599?v=4" width="100;" alt="rorystephenson"/>
            <br />
            <sub><b>Rory Stephenson</b></sub>
        </a>
    </td>
    <td align="center">
        <a href="https://github.com/ReinisSprogis">
            <img src="https://avatars.githubusercontent.com/u/69913791?v=4" width="100;" alt="ReinisSprogis"/>
            <br />
            <sub><b>Reinis Sprogis</b></sub>
        </a>
    </td></tr>
</table>
<!-- readme: contributors -end -->

[pub-package]: https://pub.dev/packages/flutter_map_animations
[pub-flutter-map]: https://pub.dev/packages/flutter_map
[example]: https://testeurmaniak.github.io/flutter_map_animations/#/
[animated-map-controller]: https://pub.dev/documentation/flutter_map_animations/latest/flutter_map_animations/AnimatedMapController-class.html
[flutter-map-v6]: https://pub.dev/packages/flutter_map/changelog#600---20231009
[flutter-map-v5]: https://pub.dev/packages/flutter_map/changelog#500---20230604
## Changelog
## 0.11.0

* chore(deps): bump latlong2 from 0.9.1 to 0.10.1 by @dependabot[bot] in https://github.com/TesteurManiak/flutter_map_animations/pull/52

## 0.10.0

* chore(deps): bump fd_lints from 2.3.0 to 3.0.0 by @TesteurManiak
* chore(deps): bump flutter_map from 8.0.0 to 8.3.0 by @TesteurManiak
* chore(deps): removed custom_lint by @TesteurManiak

## 0.9.0

* chore(deps): bump custom_lint from 0.6.10 to 0.7.0 by @dependabot in https://github.com/TesteurManiak/flutter_map_animations/pull/46
* Support flutter_map v8 by @JaffaKetchup in https://github.com/TesteurManiak/flutter_map_animations/pull/47


**Full Changelog**: https://github.com/TesteurManiak/flutter_map_animations/compare/0.8.0...0.9.0

## 0.8.0

* Fix: Stop and dispose all running animations by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/45
* Feat: Added `AnimatedMapController.stopAnimations()` method and `cancelPreviousAnimations` properties by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/45


**Full Changelog**: https://github.com/TesteurManiak/flutter_map_animations/compare/0.7.1...0.8.0

## 0.7.1

* 35 animation duration for animateto by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/36
* Fix #39 AnimateTo same point w/ different offset by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/41

**Full Changelog**: https://github.com/TesteurManiak/flutter_map_animations/compare/0.7.0...0.7.1

## 0.7.0

* 30 version 7 support by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/31
* chore(deps): bump custom_lint from 0.5.11 to 0.6.4 by @dependabot in https://github.com/TesteurManiak/flutter_map_animations/pull/33
* chore: bump dependencies by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/34

## New Contributors
* @dependabot made their first contribution in https://github.com/TesteurManiak/flutter_map_animations/pull/33

**Full Changelog**: https://github.com/TesteurManiak/flutter_map_animations/compare/0.6.0...0.7.0


## 0.6.0

* Dependencies_upgrade by @ReinisSprogis in https://github.com/TesteurManiak/flutter_map_animations/pull/26
* docs(contributor): contributors readme action update by @github-actions in https://github.com/TesteurManiak/flutter_map_animations/pull/27
* fix: added dedicated `_AngleTween` to improve rotation animation by @JaffaKetchup in https://github.com/TesteurManiak/flutter_map_animations/pull/28
* docs(contributor): contributors readme action update by @github-actions in https://github.com/TesteurManiak/flutter_map_animations/pull/29

### New Contributors
* @ReinisSprogis made their first contribution in https://github.com/TesteurManiak/flutter_map_animations/pull/26

**Full Changelog**: https://github.com/TesteurManiak/flutter_map_animations/compare/0.5.3...0.6.0

## 0.5.3

* Added `offset` support to `animateTo` by @JaffaKetchup in https://github.com/TesteurManiak/flutter_map_animations/pull/20
* docs(contributor): contributors readme action update by @github-actions in https://github.com/TesteurManiak/flutter_map_animations/pull/21
* 23 android build conflicts by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/24

## 0.5.2

* Fixed GIFs link in README.md

## 0.5.1

* feat: updated example with flutter_map_cancellable_tile_provider by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/14
* feat: added rotation parameter to animatedFitCamera by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/16
* fix: update camera with correct rotation by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/17
* Chore/update readme by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/18

## 0.5.0

**Check the [Migration Guide](https://github.com/TesteurManiak/flutter_map_animations/blob/main/README.md#migration-guide) to learn about breaking changes in this version**

* Updated to [flutter_map](https://pub.dev/packages/flutter_map/versions/6.0.0) v6

## 0.5.0-dev.1

* Updated to [flutter_map](https://pub.dev/packages/flutter_map/versions/6.0.0-dev.2) v6

## 0.4.1

* Fixed topics in `pubspec.yaml`

## 0.4.0

**Check the [Migration Guide](https://github.com/TesteurManiak/flutter_map_animations#v040) to learn about breaking changes in this version**

* Updated to [flutter_map](https://pub.dev/packages/flutter_map/versions/5.0.0) v5
* Updated Dart SDK constraints to `>=3.0.0 <4.0.0`
* Contributions from [Rory Stephenson](https://github.com/rorystephenson)
    * Add customId for for animated movements and don't trigger movement when it isn't necessary [#5](https://github.com/TesteurManiak/flutter_map_animations/pull/5)

## 0.3.0

* Updated to [flutter_map](https://pub.dev/packages/flutter_map/versions/4.0.0) v4

## 0.3.0-dev.2

* Added `AnimationId` class to manage a `TileUpdateTransformer`

## 0.3.0-dev.1

* Updated to [flutter_map](https://pub.dev/packages/flutter_map/versions/4.0.0-dev.1) v4

## 0.2.2

* Contribution from [MaxiStefan](https://github.com/MaxiStefan)
    * Use the shortest rotation path when animating the camera [#1](https://github.com/TesteurManiak/flutter_map_animations/pull/1)

## 0.2.1

* Updated example
* Allow to set a custom `Curve` to each of the methods of `AnimatedMapController`

## 0.2.0

* Added `animatedFitBounds` and `centerOnPoints` methods to `AnimatedMapController`
* Properly disposed the `AnimationController` when the widget is disposed
* Smoother animation when the `LatLng` is updated

## 0.1.0+1

* Updated `README.md` to add the pub.dev badge

## 0.1.0

* First release







 
