Magic Lane Maps SDK for Flutter

website·Indexed 33 days ago

https://developer.magiclane.com/docs/flutter/

Documentation for the Magic Lane Maps SDK for Flutter, featuring the GemMap widget. Covers 3D scenes, marker clustering, custom map styles, follow position controllers, map downloads, and advanced map interactions including gestures, perspective, and multiview maps.

Tokens
196.4K
Snippets
859
Records
1.1K
Agent score
60%

What's inside Magic Lane

  1. Overview of Image classes in Magic Lane Maps SDK

    Images in the SDK are represented as abstract objects that must be converted before they can be displayed in the UI. The SDK provides several image classes: Img, AbstractGeometryImg, LaneImg, SignpostImg, and RoadInfoImg.

    All these classes share the following common members:

    • uid: A unique ID for the image. Identical images share the same UID, which can be used to optimize UI redraws.
    • isValid: A boolean indicating if the image data is valid. Rendering methods return null if this is false.
    • getRenderableImageBytes(): Returns a Uint8List compatible with Image.memory. Returns null if invalid.
    • getRenderableImage(): Returns a RenderableImg object containing both the image size and the Uint8List bytes. Returns null if invalid.
  2. Overview of Search and Geocoding capabilities in Magic Lane Maps SDK for Flutter

    The Magic Lane Maps SDK for Flutter provides a comprehensive suite of search and geocoding tools. Key capabilities include:

    • Search Methods: Text-based search, proximity search, and category-based search.
    • Search Customization: Support for fuzzy matching, distance limits, custom landmark searches, and searching within overlays.
    • Geocoding: Forward geocoding (converting address components to locations) and reverse geocoding (converting geographic coordinates to detailed addresses).
    • Enhanced Features: Auto-suggestions for real-time results while typing and integration with Wikipedia for location-based content.
  3. Overview of Map Overlays in Magic Lane SDK

    An Overlay is an additional map layer containing data stored on Magic Lane servers, supporting both online and offline modes. Overlays can be predefined or user-defined (created via Magic Lane Map Studio using GeoJSON for POI data, categories, and binary information).

    Key constraints:

    • Overlays must be downloaded to function in offline mode.
    • Most overlay features require a GemMap widget with a style that includes the specific overlay.
  4. Overview of Magic Lane Maps SDK for Flutter

    The Magic Lane Maps SDK for Flutter allows developers to build location-aware applications with mapping and navigation. Key capabilities include:

    • Global Coverage: Uses OpenStreetMap data.
    • 3D Terrain: Detailed 3D terrain modeling for immersive experiences.
    • Navigation: Turn-by-turn routing for cars, pedestrians, and bicycles, including optional multi-language voice guidance.
    • Offline Mode: Support for offline map downloads, searching, routing, and navigation.
    • Traffic Integration: Real-time traffic and incident data for dynamic route adjustments.
    • Customization: Flexible routing preferences and customizable map styles (colors, elements, and design).
    • Search: POI (Points of Interest), address search, and geocoding.
    • Sensor Recording: A recorder feature to capture and analyze sensor data during navigation sessions.
    • Cross-Platform: Supports Android, iOS, and Web.
  5. Overview of Social Reports in Magic Lane Maps SDK

    Social reports are user-generated alerts for real-time driving conditions (e.g., accidents, police, construction). Users can create reports with categories, names, and images, and can interact with existing reports by voting on accuracy, commenting, or deleting their own reports. These reports are visible to users with the social overlay enabled and a compatible map style.
  6. Overview of the Magic Lane Maps SDK Alarm System

    The GemSDK provides a robust alarm system for Flutter applications to monitor and respond to real-time events based on a user's location, speed, and interactions with geographical boundaries or landmarks. The system supports several types of alerts, including speed violations, geographic area transitions, and proximity to landmarks.
  7. Overview of Magic Lane Routing capabilities for Flutter

    The Magic Lane Maps SDK for Flutter provides routing functionality to calculate, customize, and analyze routes. Key capabilities include:

    • Calculating routes between start and destination points, including multi-stop routes with intermediate waypoints.
    • Determining accessible areas within a specific range.
    • Retrieving turn-by-turn instructions, traffic event details, and Estimated Time of Arrival (ETA) with travel durations and distances.
    • Computing terrain profiles for elevation data.
    • Supporting public transit routes and displaying routes on a map.
  8. Overview of Positioning and Sensors in Magic Lane Maps SDK

    The Positioning module manages location data for navigation, tracking, and location-based services. It supports real GPS data and custom location sources. The accompanying Recorder module allows for the recording of sensor data (such as video, audio, or sensor information) using customizable settings via RecorderConfiguration.
  9. Overview of Route types in Magic Lane Maps SDK

    The Magic Lane Maps SDK for Flutter supports several types of routes depending on the navigation requirements:

    • Normal routes: Standard navigation between waypoints.
    • Public transport (PT) routes: Includes transit-specific data such as frequency and ticket information.
    • Over-track (OT) routes: Based on predefined paths from GPX files or drawn routes.
    • Electric vehicle (EV) routes: Includes charging station information (currently partially implemented).

    Routes can be computed in three ways: Waypoint-based (2+ landmarks), Over-track (predefined path), or Route ranges (non-navigable, no segments/instructions).

  10. Overview of Offline Map Functionality in Maps SDK for Flutter

    The Maps SDK for Flutter supports offline access by allowing users to download maps for entire countries or specific regions. When offline, users can search for landmarks, calculate routes, navigate, and explore maps.

    Key Constraints:

    • Overlays and live traffic information are unavailable in offline mode.
    • Map tiles are automatically cached based on location, camera position, and calculated routes to improve performance.
    • Map updates occur automatically by default, though preferences can be configured to restrict downloads to Wi-Fi or allow cellular data.