Skip to content

MapLibre Flutter

Interactive vector maps for Android, iOS, macOS, Windows, Linux and web. Use any MapLibre or Mapbox compatible style from any tile provider or your own server. `maplibre` needs no API key of its own and has no vendor lock-in.

Pub Version likes stars Pub Downloads

A styled map

  • Six platforms, one API


    Android, iOS, macOS, Windows, Linux and web, with the same gestures and behavior on each of them.

    Platform setup

  • Made for Flutter


    Maps render into a Flutter Texture (an HTML element on web). Annotations are declarative layers that you update with setState(), and widgets compose with the map.

    Annotations

  • Fast interop


    The package calls MapLibre through FFI instead of platform channels, so the camera and the style layers can be read synchronously.

    Architecture

  • The full style spec


    Typed style layers, sources and expressions for vector and raster tiles, PMTiles, MBTiles, hillshading, heatmaps and 3D extrusions.

    Style layers

  • Offline maps


    Download regions or only the tiles along a route, and cache what the map loads.

    Offline & Cache

  • Open source


    BSD-3-Clause licensed, with no usage fees. Choose a tile provider or host your own tiles.

    Compare packages

Your first map

import 'package:flutter/material.dart';
import 'package:maplibre/maplibre.dart';

MapLibreMap(
  options: MapOptions(
    style: MapStyle.url('https://demotiles.maplibre.org/style.json'),
    initCamera: .position(
      center: Geographic(lon: 9.17, lat: 47.68),
      zoom: 7,
    ),
  ),
  layers: [
    CircleLayer(
      points: [
        Feature(geometry: Point(Geographic(lon: 9.17, lat: 47.68))),
      ],
      color: const .literal(Colors.blue),
      radius: const .literal(12),
    ),
  ],
  children: const [MapScalebar(), MapCompass()],
)

First map

What you can build

Every example runs in the live demo, and its code is in the example app.

Platforms

Platform Package Rendering
Android maplibre_native OpenGL ES 3.0 (default) or Vulkan
iOS maplibre_native Metal
macOS maplibre_native Metal
Windows maplibre_native Vulkan, shared with Flutter via D3D11
Linux maplibre_native Vulkan, shared with Flutter via OpenGL
Web maplibre_web WebGL 2 (maplibre-gl-js)

You only add maplibre to your app; it picks the implementation for each platform. See Features for what each platform supports.

Contributing

Contributions of any kind are welcome:

List of contributors