Skip to content
pubscout

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

WASM-ready
$ flutter pub add flutter_osm_plugin
Source repository

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

  • geoflutterfire_plus

    Store and query Cloud Firestore documents based on geographic locations.

Works with

Packages commonly used together with flutter_osm_plugin: ones it builds on, ones built on it, and its own family.