Vector Maps for Flutter
Advanced User Setup
Using MapLibre GL SDK for Flutter apps
MapLibre GL SDK for Flutter
MapLibre is an open source project that was forked from Mapbox GL SDK. It is our preferred mapping program for interactive maps due to its modern design and ease of use.
Link | Description |
---|---|
Homepage | The Projects home |
Flutter Plugin | Information, examples, and plugins |
License | Liscense file |
Using in your Project
This project is not yet available on pub.dev. You can use it by referencing it in your
pubspec.yaml
like this:
This will get you the very latest changes from the main branch. You can replace main
with the name of the latest release to get a more stable version.
Run
flutter pub get
to bring in the new dependencies.
Platform Notes
iOS
To enable location features in an iOS application:
If you access your users' location, you should also add the following key to
ios/Runner/Info.plist
to explain why you need access to their location data:
A possible explanation could be: "Shows your location on the map".
Android
Add the ACCESS_COARSE_LOCATION
or ACCESS_FINE_LOCATION
permission in the application manifest android/app/src/main/AndroidManifest.xml
to enable location features in an Android application:
Starting from Android API level 23 you also need to request it at runtime. This plugin does not handle this for you. The example app uses the flutter location plugin for this.
Avoid Android UnsatisfiedLinkError
Update buildTypes in android\app\build.gradle
Web
Include the following JavaScript and CSS files in the <head>
of the web/index.html
file.
Next Steps
Customize and add features to your new map
Settings & Features
- Common settings and Language Support.
- Content Filtering
- Satellite, Street Level, and other features.
- Compatibility for older browsers.
Map Design
- Customize your maps look
- Night Mode, Greyscale.
- Get the Slpy Style source code.
Search & Geocoding
- Add a search bar to your map.
- Translate addresses to coordinates
- Search for points of interest.