Skip to content

magiclane/magiclane-maps-sdk-examples-for-flutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magic Lane Maps SDK Examples for Flutter

Explore practical examples using the Magic Lane Maps SDK for Flutter — including 3D maps, offline navigation, route calculation, traffic updates, and POI search. Build advanced location-based apps for mobile platforms with ease.

This repository contains dozens of open-source Flutter sample apps that demonstrate specific SDK features and real-world use cases. Each example focuses on a single feature or workflow, so developers can quickly clone, explore, and integrate the sample code into their projects.

Why use Magic Lane Maps SDK for Flutter

The Magic Lane Flutter Maps SDK enables developers to create feature-rich mapping and navigation apps with:

  • Global coverage and offline map support
  • Advanced routing for cars, bikes, trucks, and pedestrians
  • Customizable 3D maps and map styles
  • Voice-guided turn-by-turn navigation
  • Real-time traffic updates and driver behavior analytics

Examples

Explore the examples to learn the capabilities of the Magic Lane Maps Flutter SDK:

  • Add Markers - Handle marker tap. Customize position tracker.
  • Address Search - Showcase address search functionality.
  • Areas Alarms - Get notified when crossing a geographic area.
  • Assets Map Style - Show how to load styles from assets folder and how to apply style.
  • Better Route Notification - Get notified when a better route is detected during navigation.
  • Calculate Bike Route - Calculate a bike route & display on a map.
  • Calculate Route - Calculate & display route on a map.
  • Camera Feed - Show how to set live datasource & startFollowingPosition and sensor data recording. Display recorded path on map.
  • Center Area - Center the camera on a specific geographic area.
  • Center Coordinates - Show how to center the map on coordinates.
  • Center Traffic - Center the camera on traffic.
  • Create Custom Overlay - Create a style with custom dataset. Display and interact with overlay items from the dataset.
  • Custom Position Icon - Show how to set a custom icon for the position tracker.
  • Data Source Listeners - Show sensor info from live data source.
  • Display Cursor Street Name - Show street name based on tapped street.
  • Draw Roadblock - Draw and upload roadblocks.
  • Draw Shapes - Show how to draw and center on a polyline, polygon and on points.
  • Driver Behaviour - Start recording driver behaviour analysis. View recorded analyses.
  • External Position Source Navigation - Show how to use DataSource to push positions in order to simulate navigation.
  • Finger Route - Calculate & display route using fingers movement.
  • Follow Position - Show how to set live datasource & startFollowingPosition.
  • GPX Route - Display a map. Calculate route. Display route. Start navigation.
  • GPX Routing Thumbnail Image - Display the gpx record as a Route on map. Take a screenshot of presented Route.
  • GPX Thumbnail Image - Display the gpx record as a Path on map. Take a screenshot of presented Path.
  • Hello Map - Display a map.
  • Human Voices - Calculate & display route. Simulate route navigation. Listen to voice instructions.
  • Import Custom Landmarks - Import custom landmarks. Display and interact with custom landmarks.
  • Lane Instructions - Start a navigation. Display lane instructions.
  • Location Wikipedia - Show Wikipedia information about a landmark. Show how to search for a landmark and obtain details from wikipedia.
  • Map Compass - Display a map. Show compass.
  • Map Download - Show list of maps. Show how to download maps.
  • Map Gestures - Show how to register callbacks for map gestures.
  • Map Perspective - Show how to change map perspective, tilt angle.
  • Map Selection - Show to save landmarks to your favorites list, as well as remove them from favorites list.
  • Map Styles - Show list of styles. Show how to download and apply styles.
  • Map Style Update - Show list of styles. Update old map styles. Show how to download and apply styles.
  • Map Update - Show list of maps. Show how to download maps.
  • Multi-map Routing - Display a map. Show how to create multiple views.
  • MultiView Map - Show how to create multiple views.
  • Navigate Route - Calculate & display route. Navigate route.
  • Offline Routing - Show how to download maps.
  • Overlapped Maps - Show two maps overlapped.
  • Projections - Display coordinates in multiple geographic coordinate systems.
  • Public Transit - Calculates a public transit route. Displays the route.
  • Public Transit Stop Schedule - Select public transport stations from the map. Display public transport trip information. Show departure times for each public transport trip.
  • Range Finder - Calculate & display route. Show route ranges panel.
  • Recorder - Show how to record sensor data.
  • Record NMEA - Show how to record a log including NMEA Chunks and how to export the resulting file to CSV.
  • Recorder Bookmarks - Show how to display sensor data recordings.
  • Recorder In Background - Show how to do sensor data recording in the background.
  • Route Alarms - Show how to use the alarms service.
  • Route Instructions - Display a map. Show route instructions.
  • Route Profile - Show route profile panel (elevation chart, climb details).
  • Save Favorites - Show to save landmarks to your favorites list, as well as remove them from favorites list.
  • Search Along Route - Display a map. Calculate route. Display route. Show how to search along route.
  • Search Category - Display a map. Text search. Shows search results and the distance towards them. Highlights the selected result on the map.
  • Search Location - Display a map. Text search. Shows search results and the distance towards them. Highlights the selected result on the map.
  • Send Debug Info - Display a map. Share debug logs.
  • Simulate Navigation - Calculate & display route. Simulate route navigation.
  • Simulate Navigation Without Map - Calculate route. Simulate on a route without a map.
  • Social Event Voting - Compute a route which contains a social report and simulate navigation. Obtain nearby social reports and confirm them.
  • Speed TTS Warning - Play text-to-speech speed warnings during a simulation. Display current speed limit.
  • Speed Watcher - Calculate & display route. Simulate route navigation. Show speed indicator panel.
  • Text Search - Text search. Shows search results and the distance towards them. Highlights the selected result on the map.
  • Truck Profile - Calculates a route considering a truck profile setting. Displays the route.
  • Voice Download - Show how to download and load voices.
  • Weather Forecast - Show how to get weather information for a coordinate.
  • What is Nearby - Show how to get current position and use GenericCategories. Perform searchAroundPosition with specific categories and position.
  • What Is Nearby Category - Search nearby locations based on category.
  • Social Report - Upload and view social events.
  • Social Event Voting - Confirm social reports of other users.

Running individual examples

Individual samples can be run on an iOS or Android simulator or device.

Check the README.md inside each examples folder for instructions.

Configuring API Keys

An API Key is required to unlock the full functionality of these example applications. Follow our guide to generate your API Key.

If no API Key is set, you can still test your apps, but a watermark will be displayed, and all the online services including mapping, searching, routing, etc. will slow down after a few minutes.

You can either add your API Key directly in the main.dart file or use an environment JSON file with the --dart-define-from-file option when running the app.

To use a JSON file, create a file with the following structure:

{
    "GEM_TOKEN": "your_api_key_here"
}

Then run any example with:

flutter run --dart-define-from-file=path/to/json/file.json

Important: When adding the token directly to main.dart, update the projectApiToken constant. Always keep your API token secure and never commit it to version control.

Developer resources

License

Copyright (C) 1995-2025 Magic Lane International B.V.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

A copy of the license is available in the repository's LICENSE file.

Contact Magic Lane at info@magiclane.com for SDK licensing options.

About

A collection of sample projects to support application development with the Magic Lane Maps SDK for Flutter

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published