Skip to content

magiclane/magiclane-maps-sdk-examples-for-android

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magic Lane - Maps SDK for Android demo applications

This repository holds a series of example projects using the Magic Lane - Maps SDK for Android. More information about the API can be found on the Documentation page.

  • Android Auto Route Navigation - Start navigation from the current position to a given landmark if a route can be calculated.
  • Apply Custom Map Style - Present a map; apply a custom map style.
  • Apply Map Style - Get the map style items from the server; download and apply a map style.
  • Bike Simulation - Setup a bike routing profile and start simulation from the current position to a given landmark if a route can be calculated.
  • Basic Shape Drawer - Shows how to use BasicShapeDrawer class to do various drawings on a map.
  • BLE Client - BLE client for BLEServer example. It displays navigation instructions received from server.
  • BLE Server - Start simulated navigation between 2 given landmarks. Displays turn-by-turn navigation instructions, estimated time of arrival, remaining time and distance. Acts like BLE server. Send navigation info (next turn image id, distance to next turn, next navigation instruction) to the BLE client.
  • BLE Client1 - BLE client for BLEServer1 example. It displays navigation instructions received from server. Turn images are transferred as bitmaps.
  • BLE Server1 - Start simulated navigation between 2 given landmarks. Displays turn-by-turn navigation instructions, estimated time of arrival, remaining time and distance. Acts like BLE server. Send navigation info (next turn image as bitmap, distance to next turn, next navigation instruction) to the BLE client.
  • BLE Client2 - BLE client for BLEServer2 example. It displays navigation instructions received from server. Turn images are transferred as IDs.
  • BLE Server2 - Start simulated navigation between 2 given landmarks. Displays turn-by-turn navigation instructions, estimated time of arrival, remaining time and distance. Acts like BLE server. Send navigation info (next turn image as bitmap, distance to next turn, next navigation instruction) to the BLE client.
  • Custom GPS Arrow - Start simulated navigation between 2 given landmarks if a route can be calculated, using a custom GPS arrow.
  • Define Persistent Roadlock - Make possible the definition of a persistent roadblock.
  • Display Current Street Name - Fly to current coordinates. Display current street name, speed and road modifier.
  • Downloaded Onboard Map Simulation - Fully offline start simulation between 2 given landmarks if any route can be calculated.
  • Downloading Onboard Map - Gather the list of available maps; Download an onboard map.
  • Downloading Onboard Map Simulation - Gather the list of available maps; Download an onboard map. Starts a simulation.
  • Draw Polyline - Create a polyline and its display settings; fly to the polyline.
  • External Position Source Navigation - Navigate to a given landmark using an external data source (GPS positions are not coming from system. They are hardcoded in the app and they are provided to the SDK via an "ExternalDataSource" object)
  • Favourites - Fly to a location and use UI to add or remove that landmark to/ from the favourites folder.
  • Finger Route - Calculates a route that tries to follow finger movement on the map; render route on top of finger line.
  • Fly to Area - Search for a landmark; fly to resulted landmark, if exists.
  • Fly To Coordinates - Fly to given coordinates.
  • Fly to Route Instruction - Calculate the routes between 2 given landmarks; display the first route on a map, if exists; fly to first route instruction, if exists.
  • Fly to Traffic - Calculate the routes between 2 given landmarks; display the first route on a map, if exists; fly to first traffic event available on route, if exists.
  • GPX Import - Import a GPX file and display the Path on the map; make a route out of the GPX file.
  • GPX Route Simulation - Import a GPX file; Make a route based on the GPX and start a simulation.
  • GPX Thumbnail Image - Present a thumbnail image for a route based on a GPX file without using a routing service.
  • GPX Thumbnail Image With Routing - Calculate a route based on a GPX file and present a thumbnail image for it using a routing service.
  • Hello Fragment - Display a map on an Android Fragment.
  • Hello Fragment Custom Style - Display a map on an Android Fragment; apply custom style to a map.
  • Hello Map - Display a map.
  • Hello Map Compose - Hello Map - example using Jetpack Compose.
  • Hello SDK - Show how the Maps SDK for Android can be integrated into your project.
  • Lane Instructions - Calculate the routes between 2 given landmarks; display the recommended lanes for the next turn instruction.
  • Location Wikipedia - Search for a landmark; request Wikipedia info about first resulted landmark, if exists.
  • Map Compass - Display an interactive map with a compass.
  • Map Gestures - Display an interactive map supporting pan, zoom, rotate, tilt that displays logs about what gestures the user made on the map.
  • Map Perspective Change - Display an interactive map with a button that changes the view perspective between 2D and 3D.
  • Map Selection - Present a map. Calculate the routes between 2 given landmarks. Illustrates how to tap on different map overlays.
  • Map Selection Compose - Map Selection example using Jetpack Compose.
  • Marker Collection Display Icon - Shows usage of MarkerCollection.
  • Multiple surfaces in Fragment - Display a variable list of maps on an Android Fragment.
  • Multiple surfaces in Fragment Recycler - Displaying a variable list of maps on an Android Fragment.
  • Overlapped Maps - Display a second map view over the existing one.
  • Projection - Show various types of projections for landmarks.
  • Public Transit Routing on Map - Calculate the public transport routes between 2 given landmarks; display all results on the map and fly to the main route, if exists.
  • Range Finder - Calculate the routes between 2 given landmarks; display and fly to the first route in the resulting route list, if it exists.
  • Range Finder Compose - Range Finder example using Jetpack Compose.
  • Route Alarms - Start simulated navigation between 2 given landmarks if a route can be calculated.
  • Route Instructions - Calculate the routes between 2 given landmarks; display a list with all route instructions, if exists.
  • Route Navigation - Start navigation from the current position to a given landmark if any route can be calculated.
  • Route Simulation - Start simulation between 2 given landmarks if any route can be calculated.
  • Route Simulation with Instructions - Start simulation between 2 given landmarks. Displays turn-by-turn navigation instructions, estimated time of arrival, remaining time and distance.
  • Route Simulation with Instructions Compose - Route Simulation with Instructions example using Jetpack Compose.
  • Route Simulation without Map - Start simulated navigation between 2 given landmarks. Displays turn-by-turn navigation instructions, estimated time of arrival, remaining time and distance. No map is displayed.
  • Route Terrain Profile - Calculate the routes between 2 given landmarks; display some of the route terrain profile details available for a route.
  • Routing - Calculate the routes between 2 given landmarks.
  • Routing on Map - Calculate the routes between 2 given landmarks; display and fly to the first resulted route, if exists.
  • Routing on Map Java - Calculate the routes between 2 given landmarks; display and fly to the first resulted route, if exists.
  • Search - Searches for landmarks based on user input; display a list with landmarks found.
  • Search Compose - Search example using Jetpack Compose.
  • Search Along Route - Start simulation between 2 landmarks. Search for gas stations along the route if the search button is pressed.
  • Send Debug Info - This example app shows how to send the app log and latest crash report, if any, to Magic Lane support.
  • Set TTS Language - Shows usage of SoundPlayingService class and setting TTS language.
  • Social Event Voting - Presents a social event panel that displays the score of the event and the option to vote the event.
  • Social Report - Waits for a valid position. Submit a social report.
  • Speed TTS Warning Navigation - Starts a navigation from the current position to a given landmark. Displays the current speed and the legal speed limit. Sends a TTS warning each time the current speed overcomes the legal speed limit.
  • Speed TTS Warning Tracking - Displays the current speed and the legal speed limit. Sends a TTS warning each time the current speed overcomes the legal speed limit.
  • Speed Watcher - Start simulation between 2 given landmarks. Display the current speed and the legal speed limit.
  • Track Positions - Mocks navigation from point A to point B using external data source while tracking positions. Displays path using tracked positions.
  • Truck Profile - Calculate the truck routes between 2 given landmarks. Change the truck profile and recalculate routes depending on the new settings.
  • Voice Downloading - Gather the list of available voices; download first available voice.
  • Voice Instructions Route Simulation - Start simulation between 2 given landmarks if any route can be calculated; use TTS to play navigation instructions.
  • Weather - Show how to use weather service to display forecast for a selected landmark.
  • What's Nearby - Searches all landmarks near current position; display a list of found landmarks.
  • What's Nearby Category - Searches all landmarks of a specific category near current position; display a list of found landmarks.

Note: As the very first step, we highly recommend that you get a token from Magic Lane Portal. If no token 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.

Note: Build all examples by using build_all.sh. First set environment variable ANDROID_SDK_ROOT, e.g.: export ANDROID_SDK_ROOT=/path/to/android-sdk and then call build_all.sh

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

Real-world use cases for the Magic Lane Maps SDK on Android to support faster app development and feature exploration

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages