animated_marker
0.3.4, released 3 weeks ago by shakyapurna.com.np
Animate Google Maps markers smoothly between location updates in Flutter.
What it does
Continuously interpolates position, bearing, alpha, and z-index for Google Maps markers to prevent sudden jumps or jerky movements between updates. It handles static vs animated partitioning, viewport culling, and adaptive performance tuning to maintain high frame rates.
AI-written summary of version 0.3.4, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building a real-time fleet tracking or delivery app using Google Maps.
- Marker positions update frequently and you want smooth animated transitions instead of sudden jumps.
Skip it when
- You are using a map provider other than Google Maps (e.g., flutter_map or Mapbox).
- You do not need marker animations and only display static points of interest.
Strengths
- Smooth spherical angle rotation and position interpolation.
- Built against the platform interface to prevent native plugin conflicts.
- Adaptive performance tuning automatically handles device load to preserve 60 FPS.
Weaknesses
- Strictly tied to Google Maps for Flutter.
- Requires proper handling of marker sets to distinguish static vs animated elements.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
Add the package to pubspec.yaml and wrap your GoogleMap widget with the AnimatedMarker builder.
AnimatedMarker(
animatedMarkers: movingVehicles,
staticMarkers: staticDepots,
animationPolicy: const AnimationPolicy(
duration: Duration(seconds: 2),
curve: Curves.easeInOut,
maxFps: 30,
),
builder: (BuildContext context, Set<Marker> markers) {
return GoogleMap(
initialCameraPosition: const CameraPosition(
target: LatLng(37.77483, -122.41942),
zoom: 14,
),
markers: markers,
);
},
)Alternatives
Packages that do the same job and could replace animated_marker.
- google_maps_flutter
If you do not need built-in smooth marker animations and prefer to manage standard Google Maps markers manually.
90Compare