Skip to content

josxha/flutter-maplibre

Repository files navigation

MapLibre for Flutter

Pub Version likes Pub Points Pub Popularity style: very good analysis

GitHub last commit stars GitHub issues

This package provides unofficial Flutter bindings for MapLibre SDKs.

  • maplibre-gl-js is used for web
  • maplibre-native (previously named maplibre-gl) is used for android and in the future for iOS, windows, macOS and Linux

MapLibre is a permissive and open source solution for the MVT (Mapbox Vector Tile) standard. By binding to native SDKs the package accomplishes performant rendering while supporting a lot of complex functionality.

Use custom vector styles Custom styled map Pitch or rotate the map Tilted and rotated map Use raster tiles Fill Layer
Add circles Circle Layer Add 3D building outlines Fill Extrusion Layer Add polygons Fill Layer
Add heatmaps Fill Layer Render elevation Fill Extrusion Layer Add lines Fill Layer
Add markers Symbol Layer

Resources

Demo Application

Check out the hosted demo application or dive into the example app code.

Get Started & Documentation

Visit the docs to learn how to get started with maplibre in your project: Get Started

If you want to know more about the classes and properties of the package, have a look at the API docs.

State of Implementation

This package is still a young package and in an early stage. While it offers a modern implementation, it currently lacks some functionality. See our documentation to learn more.

Development & Contributing

If you need a feature or experience a bug you want to fix contributions are welcome.

Run Code Generation

We use code generation from pigeon. If you change the file pigeons/pigeon.dart you'll have to run the code generator. Use the generator script in the ./pigeons directory (or run the commands manually) to generate the necessary code.

Test with WebAssembly

This package supports WebAssembly builds! 🥳

flutter pub global activate dhttpd # only once
cd example
flutter build web --wasm
dhttpd '--headers=Cross-Origin-Embedder-Policy=credentialless;Cross-Origin-Opener-Policy=same-origin' --path=build/web

or follow the flutter documentation about Flutter WASM builds.