Last updated:
0 purchases
mmi animap
Marker animator
While working in map with Live-Tracking, You may like to show marker moving animation. This package
will help you to animate marker over MapMyIndia's Map.
Features #
This initial version will use to move marker icon with smooth animation.
Getting started #
This package only support in MapMyIndia's map. Tested android and Ios
Installation #
Add the latest version of package to your pubspec.yaml (and run `dart pub get`)
dependencies:
mmi_animap: ^0.0.2
copied to clipboard
Import the package and use it in your Flutter App.
import 'package:mmi_animap/mmi_animap.dart';
copied to clipboard
Usage #
To initialize MmiAnimarker you need to pass MapmyIndiaMapController and vsync
late MmiAnimarker mmiAnimarker;
_onMapCreated(MapmyIndiaMapController controller) {
mmiAnimarker = MmiAnimarker(controller, this);
}
copied to clipboard
late Symbol carMarkerSymbol;
String carMarker = 'carMarker';
_addCarMarker(LatLng cabLatLng) async {
var symbolOptions = SymbolOptions(
geometry: cabLatLng,
iconImage: carMarker,
iconSize: 0.8,
);
cabMarkerSymbol = await mmiAnimarker.addAnimarkerSymbol(
carMarker, AppImages.IMG_CAR_MARKER, symbolOptions);
}
copied to clipboard
_animateCabIcon(LatLng currentLatLng) async {
if (cabMarkerSymbol != null)
await mmiAnimarker.animateMarker(currentLatLng, cabMarkerSymbol!);
}
copied to clipboard
@override
void dispose() {
mmiAnimarker.dispose();
super.dispose();
}
copied to clipboard
Screenshot #
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.