generic_map 0.5.0
generic_map: ^0.5.0 copied to clipboard
A generic maps api supporting Google Maps, Mapbox, OpenStreetMaps and MapLibre
Generic Map #
A simple wrapper around:
- flutter_map
- google_maps_flutter
- mapbox_maps_flutter
This library acts as a wrapper around some of the most popular map providers in Flutter. It provides a unified API over multiple map providers, allowing you to switch between them with minimal changes to your code. Additionally it tries to resolve some of the limitations and shortcomings of the official map providers.
β¨ Features #
- π Unified API: Consistent interface across multiple map providers
- π― Feature Parity: Achieve identical functionality across all map providers
- π¨ Widget Markers: Support for widget markers on google_maps (Beyond official API)
- π Mapbox Markers: Widget marker support for mapbox_maps (Not in official API)
- π Declarative Syntax: Simplified marker, polyline, and polygon management vs native APIs
- πΎ Enhanced Caching: Added caching capabilities for flutter_map
- π¬ Animation Support: Smooth animations for flutter_map components
Feature Comparison #
| Feature | flutter_map (OSM, MapBox) | Google Maps | Mapbox OpenGL | MapLibre GL |
|---|---|---|---|---|
| Static Markers | β | β | β | β |
| Interactive Markers | β | β | β | β |
| Polylines | β | β | β | β |
| Circles | β | β | β | β |
| Map Gestures | β | β | β | β |
| Heatmaps | π§ Work In Progress | π§ | π§ | π§ |
| Caching | β | β | β | β |
| Animations | β | β | β | β |
Installation #
Add this package to your pubspec.yaml:
dependencies:
generic_map: ^0.4.0
Usage #
import 'package:generic_map/generic_map.dart';
final map = GenericMap(
// ...existing code...
);