flutter_osm_plugin
4.1.0, released 7 days ago by an unverified publisher
OpenStreetMap plugin for Flutter with native Android, iOS, macOS and Web support
What it does
Provides a Map widget that displays OpenStreetMap tiles and supports markers, routes, shapes and address search. It exposes a MapController for imperative control and event streams for reactive updates.
AI-written summary of version 4.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a fully native map widget with OSM tiles
- You require routing, distance calculation or address suggestions
- You want to customize markers, tiles or draw roads and shapes
Skip it when
- You only need a simple static map image
- Your project targets very low Android API levels (<26)
- You prefer a pure Dart map implementation without native dependencies
Strengths
- Native performance across Android, iOS, macOS and Web
- Supports vector tiles, satellite and custom tile layers
- Built-in routing, distance, duration and address suggestion APIs
- Declarative widget API with imperative MapController
Weaknesses
- Requires native build setup (AGP 9.3+, Gradle 9.5+)
- High minimum Android API (26) and iOS 15.6, macOS 12.0
- Complex native integration for Web (PointerInterceptor)
- No code generation support
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 11
Add dependency, run `flutter pub get`. For Android, ensure minSdk 26, compileSdk 37, AGP 9.3.1+, Gradle 9.5.0+. iOS uses Swift Package Manager; macOS requires SPM. Permissions for location are handled via permission_handler. No build_runner needed.
```dart
import 'package:flutter_osm_plugin/flutter_osm_plugin.dart';
class MapPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return OSMFlutter(
controller: MapController(),
initZoom: 13,
initCenter: GeoPoint(latitude: 48.8566, longitude: 2.3522),
userTrackingOption: UserTrackingOption(enabled: true),
);
}
}
```Alternatives
Packages that do the same job and could replace flutter_osm_plugin.
- maplibre_gl
Native MapLibre maps for Android, iOS and Web with vector tiles, PMTiles, GeoJSON and offline support
91Compare - geoflutterfire_plus
Store and query Cloud Firestore documents based on geographic locations.
66Compare
Works with
Packages commonly used together with flutter_osm_plugin: ones it builds on, ones built on it, and its own family.
- uuidflutter_osm_plugin depends on itGenerates and parses RFC‑4122/9562 UUIDs (v1‑v8) for Dart.
- plugin_platform_interfaceflutter_osm_plugin depends on itReusable base class for platform interfaces of Flutter federated plugins.
- url_launcherflutter_osm_plugin depends on itFlutter plugin for launching URLs across mobile, desktop, and web platforms.
- dioflutter_osm_plugin depends on itA powerful HTTP networking package for Dart and Flutter with interceptors and request cancellation.
- permission_handlerflutter_osm_plugin depends on itCross-platform API to check and request permissions on iOS, Android, Web, and Windows.
- google_polyline_algorithmflutter_osm_plugin depends on itDart implementation of Google's Polyline Encoding lossy compression algorithm.
- routing_client_dartflutter_osm_plugin depends on itDart client package for routing APIs like OSRM and Valhalla.