Viewing version 0.11.0. Open the latest package page.

flutter_map_animations

0.11.0

Animation utilities for markers and controls of the flutter_map package.

Download archive

Readme

Flutter Map Animations

Pub Version (including pre-releases)

Animation utility for the flutter_map package.

Try the example app

Table of Contents

Documentation

AnimatedMapController

Just create an AnimatedMapController and you're good to go:

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:

AnimatedMapController(
    vsync: this,
    duration: const Duration(milliseconds: 500),
    curve: Curves.easeInOut,
    cancelPreviousAnimations: true, // Default to false
);

And add it to your FlutterMap widget:

FlutterMap(
    mapController: _animatedMapController.mapController,
    // ...
)

Animated Movement

Rotation Zoom Center on point

Check the AnimatedMapController API for more!

AnimatedMarkerLayer & AnimatedMarker

AnimatedMarker
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 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 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:
late final _animatedMapController = AnimatedMapController(vsync: this);

@override
Widget build(BuildContext context) {
    return FlutterMap(
        mapController: _animatedMapController.mapController,
        // ...
    );
}

Contributors

Changelog

0.11.0

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

Full Changelog: https://github.com/TesteurManiak/flutter_map_animations/compare/0.8.0...0.9.0

0.8.0

Full Changelog: https://github.com/TesteurManiak/flutter_map_animations/compare/0.7.1...0.8.0

0.7.1

Full Changelog: https://github.com/TesteurManiak/flutter_map_animations/compare/0.7.0...0.7.1

0.7.0

New Contributors

Full Changelog: https://github.com/TesteurManiak/flutter_map_animations/compare/0.6.0...0.7.0

0.6.0

New Contributors

Full Changelog: https://github.com/TesteurManiak/flutter_map_animations/compare/0.5.3...0.6.0

0.5.3

0.5.2

  • Fixed GIFs link in README.md

0.5.1

0.5.0

Check the Migration Guide to learn about breaking changes in this version

0.5.0-dev.1

0.4.1

  • Fixed topics in pubspec.yaml

0.4.0

Check the Migration Guide to learn about breaking changes in this version

  • Updated to flutter_map v5
  • Updated Dart SDK constraints to >=3.0.0 <4.0.0
  • Contributions from Rory Stephenson
    • Add customId for for animated movements and don't trigger movement when it isn't necessary #5

0.3.0

0.3.0-dev.2

  • Added AnimationId class to manage a TileUpdateTransformer

0.3.0-dev.1

0.2.2

  • Contribution from MaxiStefan
    • Use the shortest rotation path when animating the camera #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

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add 'flutter_map_animations:0.11.0'
pubspec.yaml
name: flutter_map_animations
description: Animation utilities for markers and controls of the flutter_map package.
version: 0.11.0
homepage: https://github.com/TesteurManiak/flutter_map_animations
repository: https://github.com/TesteurManiak/flutter_map_animations
issue_tracker: https://github.com/TesteurManiak/flutter_map_animations/issues
screenshots:
  - description: Animated markers
    path: gifs/animated-marker.gif
  - description: Animated movement
    path: gifs/center-on-point.gif
  - description: Animated rotate
    path: gifs/rotate.gif
  - description: Animated zoom
    path: gifs/zoom.gif
funding:
  - https://www.buymeacoffee.com/guillaumeroux
topics:
  - flutter-map
  - map
  - animation

environment:
  sdk: ">=3.0.0 <4.0.0"

dependencies:
  flutter:
    sdk: flutter
  flutter_map: ">=8.3.0 <9.0.0"
  latlong2: ">=0.9.1 <0.11.0"

dev_dependencies:
  flutter_lints: 6.0.0
  flutter_test:
    sdk: flutter

Version history

VersionPublishedArchiveSHA-256
0.1.0On demandDownload2e4e917f…4b1546
0.1.0+1On demandDownloadf017c743…35e936
0.2.0On demandDownload41e7de54…12e74d
0.2.1On demandDownload7c8da842…b255e0
0.2.2On demandDownloada780978a…9add79
0.3.0-dev.1On demandDownload2c0bcdf7…88db74
0.3.0-dev.2On demandDownload70130f84…86ea79
0.3.0On demandDownload69ef62c7…fbdebd
0.4.0On demandDownload789d9a6a…c16d0a
0.4.1On demandDownloada08b9533…9da544
0.5.0-dev.1On demandDownloadef5705da…34ea06
0.5.0On demandDownloadecf56536…a02081
0.5.1On demandDownload4220f69e…d8d0a0
0.5.2On demandDownload64aeb079…f8f997
0.5.3On demandDownloadb21fbfc0…48c33f
0.6.0On demandDownloade4b92963…e1c4a9
0.7.0-dev.1On demandDownloade714e837…b2fa0d
0.7.0On demandDownload826c10a5…1c5611
0.7.1On demandDownloada2135cd3…42eae9
0.8.0On demandDownload08233f89…050d36
0.9.0On demandDownloadbf583863…35a09e
0.10.0On demandDownloadfda31e6c…88bfdc
0.11.0Cached · Upstream SHA-256 matchedDownloada524e59b…2c8f17

Dependencies

flutter { "sdk": "flutter" }

flutter_map "\u003e=8.3.0 \u003c9.0.0"

latlong2 "\u003e=0.9.1 \u003c0.11.0"