# Magic Lane - Maps SDK for C++ documentation ## Docs - [Fleet Management](/docs/cpp/examples/fleet-management.md): Example applications for the Fleet Management C++ API are available on IssueTracker. You can clone the repository and launch the applications by following the setup instructions provided in the README file. - [Add Optimization with Full Details](/docs/cpp/examples/fleet-management/add-full-optimization.md): The example covers the following features: - [Add Optimization with Fixed Orders Sequence](/docs/cpp/examples/fleet-management/add-optim-with-fixed-sequence.md): This example demonstrates how to create an optimization where specific orders must be visited in a fixed sequence by the same vehicle. The example covers the following features: - [Add Optimization with Multiple Departures](/docs/cpp/examples/fleet-management/add-optim-with-multiple-departures.md): The example covers the following features: - [Add Optimization with Multiple Destinations](/docs/cpp/examples/fleet-management/add-optim-with-multiple-destinations.md): Overview - [Add Optimization with Orders in the Same Route](/docs/cpp/examples/fleet-management/add-optim-with-orders-in-the-same-route.md): This example demonstrates how to create an optimization where specific orders must be visited by the same vehicle, ensuring they are part of the same route. The example covers the following features: - [Add Optimization with Orders Sequences](/docs/cpp/examples/fleet-management/add-optim-with-orders-sequence.md): The example covers the following features: - [Add Optimization with Orders Sequence Pairs](/docs/cpp/examples/fleet-management/add-optim-with-orders-sequence-pairs.md): The example covers the following features: - [Add Optimization with Set Matrices](/docs/cpp/examples/fleet-management/add-optim-with-set-matrices.md): The example covers the following features: - [Add Optimization with Single Vehicle](/docs/cpp/examples/fleet-management/add-optim-with-single-vehicle.md): The example covers the following features: - [Add Orders to a Route](/docs/cpp/examples/fleet-management/add-orders-to-a-route.md): This example demonstrates how to add a list of orders into an existing route's order list at optimal positions determined by the algorithm. The orders will be inserted between existing route orders without rearranging them. If the route is reoptimized, the orders will be rearranged in the best order of visit, and you may not see them inserted at the original optimal positions. - [Add Orders to an Optimization](/docs/cpp/examples/fleet-management/add-orders-to-an-optim.md): This example demonstrates how to add a list of orders to an existing optimization. The newly added orders will be assigned to the optimization’s routes if the optimization is reoptimized. If reoptimization is not enabled, the added orders will be stored but not assigned to routes. - [Generate Territories](/docs/cpp/examples/fleet-management/generate-territories.md): This example demonstrates how to generate polygon territories from a list of coordinates and display them on a map. The example covers the following features: - [Merge Routes](/docs/cpp/examples/fleet-management/merge-routes.md): This example demonstrates how to merge multiple routes into a single route. A new optimization will be created for the merged route, inheriting the configuration parameters, vehicle constraints, and other settings from the first route in the list. The merged route will not be optimized automatically. - [Reoptimize Optimization](/docs/cpp/examples/fleet-management/reoptimize-optim.md): This example demonstrates how to reoptimize an existing optimization to generate a new and potentially better solution. The reoptimization process uses the latest fuel prices to calculate the new solution (refer to the Get Fuel Prices example). - [Reoptimize Route](/docs/cpp/examples/fleet-management/reoptimize-route.md): This example demonstrates how to reoptimize an existing route to rearrange the orders in a better sequence of visits, if such a sequence exists. The reoptimization process uses the latest fuel prices to calculate the route's cost. For more details on retrieving fuel prices, refer to the Get Fuel Prices. - [Unlink Route from Optimization](/docs/cpp/examples/fleet-management/unlink-route.md): This example demonstrates how to unlink a route from its optimization. When a route is unlinked, it will no longer be part of the optimization's solution. The orders visited in this route will be removed from the optimization, and a new optimization will be created for the unlinked route. The new optimization will retain the same configuration parameters, vehicle constraints, and other fields as the unlinked route. - [Update Optimization](/docs/cpp/examples/fleet-management/update-optim.md): This example demonstrates how to update an existing optimization by making changes to its configuration, vehicles, constraints, and other fields. The updated optimization can also be reoptimized to generate a new solution. If the optimization is not reoptimized, the changes will not be applied to the optimization's routes. - [Update Route](/docs/cpp/examples/fleet-management/update-route.md): This example demonstrates how to update an existing route by making changes to its configuration, vehicle constraints, and other fields. The updated route can also be reoptimized to generate a new order of visits. If the route is not reoptimized, the changes will not affect the route's optimization. However, certain configuration changes (e.g., ignoring time windows, optimization criteria, etc.) automatically trigger reoptimization. - [Maps & 3D Scene](/docs/cpp/examples/maps-3dscene.md): Example applications for the Maps SDK for C++ are available on IssueTracker. You can clone the repository and launch the applications by following the setup instructions provided in the README file. - [Center Map](/docs/cpp/examples/maps-3dscene/center-map.md): Center the map view over a pair of coordinates. - [Change Map Style](/docs/cpp/examples/maps-3dscene/change-map-style.md): In this guide you will learn how to change the map style used to render an interactive map. - [Map Perspective](/docs/cpp/examples/maps-3dscene/map-perspective.md): Toggle the map perspective or tilt/view angle. - [Map Style](/docs/cpp/examples/maps-3dscene/map-style.md): Change the map style used to render the interactive map. - [Map View](/docs/cpp/examples/maps-3dscene/map-view.md): Render an interactive map supporting pan and zoom. - [Markers](/docs/cpp/examples/maps-3dscene/markers.md): In this guide you will learn how to draw point, polyline and polygon markers on an interactive map, as well as how to remove them. - [Multi Map View](/docs/cpp/examples/maps-3dscene/multi-map-view.md): Show multiple map views. - [Points Marker](/docs/cpp/examples/maps-3dscene/points-marker.md): Render a set of point markers on the interactive map. - [Polygon Marker](/docs/cpp/examples/maps-3dscene/polygon-marker.md): Render a set of polygons on the interactive map. - [Polyline Marker](/docs/cpp/examples/maps-3dscene/polyline-marker.md): Render a set of lines on the interactive map. - [Public Transit Stop](/docs/cpp/examples/maps-3dscene/public-transit-stop.md): Retrieve the schedule information from a public transit stop overlay item. - [Switch Map Perspective](/docs/cpp/examples/maps-3dscene/switch-map-perspective.md): In this guide you will learn how to toggle the interactive map view angle between vertical look-down, and perspective mode, with a view partially inclined toward the horizon. - [Places & Search](/docs/cpp/examples/places-search.md): This collection of articles showcases a comprehensive suite of precision-driven location and search techniques - instantly delivering accurate POI results for landmarks, restaurants, businesses, cities, neighborhoods, attractions, and specific addresses; enabling the discovery of nearby, departure-point, or destination-relevant places (for example, EV charging stations) with essential details such as pricing, hours of operation, and landmark information; and providing global data online or offline, all seamlessly embedded directly in the map for up-to-the-minute, reliable navigation every time. - [Free Text Search](/docs/cpp/examples/places-search/free-text-search.md): Search for places using text. - [Location Wikipedia](/docs/cpp/examples/places-search/location-wikipedia.md): Retrieve wikipedia information from a landmark. - [Multi Search](/docs/cpp/examples/places-search/multi-search.md): In this guide you will learn how search for POIs (points of interest) around a position, search free text around a position, and search within a specified rectangular area. - [Search Around](/docs/cpp/examples/places-search/search-around.md): Search for nearby places, or reverse geocode, using a pair of coordinates. - [Text Search in Geographic Area](/docs/cpp/examples/places-search/text-search-geographic-area.md): Search for places using free-form text. Obtain the results located within the given geographic area. - [Routing & Navigation](/docs/cpp/examples/routing-navigation.md): The Maps SDK for C++ offers ready-to-run examples showcasing mode-aware routing - from battery-optimized EV charge paths and real-time traffic-aware car routes to bike-friendly lanes, truck-compliant roads, live transit connections, and pedestrian shortcuts - so you can quickly integrate tailored, high-performance navigation into your C++ applications. - [Areas Alarms](/docs/cpp/examples/routing-navigation/areas-alarms.md): Receive real-time notifications for boundary crossings (entry/exit) within a designated area. - [Calculate Route](/docs/cpp/examples/routing-navigation/calculate-route.md): In this guide you will learn how to calculate a route and render it on an interactive map. - [Calculate Route Multi View](/docs/cpp/examples/routing-navigation/calculate-route-multi-view.md): Calculate 4 routes and add them in 4 separate interactive map views. - [Export Track](/docs/cpp/examples/routing-navigation/export-track.md): This guide demonstrates the following features: - [Feed Sensor Data](/docs/cpp/examples/routing-navigation/feed-sensor-data.md): Feed sensor data, such as position, acceleration, compass or temperature to the SDK. - [Finger Route](/docs/cpp/examples/routing-navigation/finger-route.md): Render a route on the interactive map by drawing it, tracing with a finger. - [GPX NMEA Playback](/docs/cpp/examples/routing-navigation/gpx-nmea-playback.md): In this guide you will learn: - [GPX Routing Simulation](/docs/cpp/examples/routing-navigation/gpx-routing-simulation.md): In this guide you will learn: - [Low-End CPU Navigation](/docs/cpp/examples/routing-navigation/low-end-cpu-navigation.md): Adjust navigation properties for low-end embedded devices with limited resources. - [Play Route](/docs/cpp/examples/routing-navigation/play-route.md): Playback a previously recorded or generated GPS log navigation as input. - [Route Direction Arrows](/docs/cpp/examples/routing-navigation/route-direction-arrows.md): In this guide you will learn how to render arrows on the route, indicating the direction of travel, and also set their color. RoutingService is used to compute a route and NavigationService to start a real or simulated navigation on that route, with the route direction arrows layer activated. The Route Direction Arrows layer must be added to the map style used for rendering the map. - [Save GPX](/docs/cpp/examples/routing-navigation/save-gpx.md): In this guide you will learn how to save map matched improved positions obtained during a real or simulated navigation, in GPX format. - [Simulate Navigation](/docs/cpp/examples/routing-navigation/simulate-navigation.md): In this guide you will learn how to calculate a route, render it on an interactive map, and simulate navigation on that route. - [Activation Service](/docs/cpp/guides/activation-service.md): The Magic Lane Activation Service API is a C++ interface for securely activating licenses in Magic Lane SDK-based products. - [Alarms](/docs/cpp/guides/alarms.md): In modern mobile applications, providing real-time notifications and alerts is crucial for ensuring a seamless user experience, especially in location-based services. The SDK offers a robust alarm system that enables developers to monitor and respond to various events based on the user's location, speed, and interactions with geographical boundaries or landmarks. - [Areas alarms](/docs/cpp/guides/alarms/areas-alarms.md): Trigger operations when users enter or exit defined geographic areas using the built-in AlarmService class. - [Get started with Alarms](/docs/cpp/guides/alarms/get-started-alarms.md): The alarm system within the C++ SDK offers a range of monitoring and notification functionalities. It allows for the detection and management of different types of alarms, such as boundary crossings, speed limit violations, and landmark alerts. The system provides the ability to configure parameters like alarm distance, overspeed thresholds, and whether monitoring should occur even without a route being followed. - [Landmark and overlay alarms](/docs/cpp/guides/alarms/landmark-and-overlay-alarms.md): The AlarmService can be configured to send notifications upon approaching specific landmarks or overlay items within a defined proximity. This behavior can be tailored to trigger notifications exclusively during navigation or simulation modes, or while freely exploring the map without a predefined route. - [Other alarms](/docs/cpp/guides/alarms/other-alarms.md): Receive alerts for environmental changes such as entering or exiting tunnels and transitions between day and night. - [Speed warnings](/docs/cpp/guides/alarms/speed-alarms.md): The SDK provides features for monitoring and notifying users about speed limits and violations. You can configure alerts for when a user exceeds the speed limit, when the speed limit changes on the new road segment with respect to the previous, and when the user returns to a normal speed range (onNormalSpeed). The SDK also allows you to set customizable thresholds for speed violations, which can be adjusted for both city and non-city areas. These features help provide timely and relevant speed-related notifications based on the user's location and current speed. - [Core](/docs/cpp/guides/core.md): The articles will guide you in working with landmarks and markers, providing a deeper understanding of predefined and user-defined points of interest, rich metadata, and dynamic annotations. Additionally, you’ll learn how to integrate layered map data through overlays and create navigable routes for various use cases. Finally, you’ll delve into real-time navigation system entities, capable of supporting turn-by-turn guidance and route simulation to enhance user experience. - [Base entities](/docs/cpp/guides/core/base-entities.md): On this page, we present the simpler ones (coordinates, position, path, geographic areas), while in the following pages we cover the more complex ones (landmarks, markers, overlays, routes). - [Landmarks](/docs/cpp/guides/core/landmarks.md): A landmark is a predefined, permanent location that holds detailed information such as its name, address, description, geographic area, categories (e.g., Gas Station, Shopping), entrance locations, contact details, and sometimes associated multimedia (e.g., icons or images). It represents significant, categorized locations with rich metadata, providing structured context about a place. - [Landmarks vs Markers vs Overlays](/docs/cpp/guides/core/landmarks-markers-overlays.md): When building a sophisticated mapping application, choosing the right type of object to use for your specific needs is crucial. To assist in making an informed decision, we compare the three core mapping entities in the table below: - [Markers](/docs/cpp/guides/core/markers.md): A marker is a visual representation (such as an icon or a geometry, like a polyline or polygon) placed at a specific geographic location on a map to indicate an important point of interest, event, or location. - [Navigation instructions](/docs/cpp/guides/core/navigation-instructions.md): The Maps SDK for C++ offers comprehensive real-time navigation guidance, providing detailed information on the current and upcoming route, including road details, street names, speed limits, and turn directions. It delivers essential data such as remaining travel time, distance to destination, and upcoming turn or road information, ensuring users receive accurate, timely instructions. Designed for both navigation and simulation scenarios, this feature enhances the overall user experience by supporting smooth and efficient route planning and execution. - [Overlays](/docs/cpp/guides/core/overlays.md): An Overlay is an additional map layer, either default or user-defined, with data stored on Magic Lane servers, accessible in online and offline modes, with few exceptions. - [Positions](/docs/cpp/guides/core/positions.md): The sense::IImprovedPosition classes provide a comprehensive representation of geographical and movement data for GPS-based systems. They include details like coordinates, speed, altitude, direction, and accuracy, along with road-related metadata such as speed limits and modifiers. With robust support for position quality assessment and timestamped data, it is well-suited for navigation and sensor-driven applications. - [Routes](/docs/cpp/guides/core/routes.md): A Route usually represents a navigable path between two or more landmarks (waypoints). It includes data such as distance, estimated time, and navigation instructions. - [Traffic Events](/docs/cpp/guides/core/traffic-events.md): The Maps SDK for C++ provides real-time information about traffic events, such as delays, which can occur in various forms. - [Driver Behaviour](/docs/cpp/guides/driver-behaviour.md): The Driver Behaviour feature enables the analysis and scoring of a driver's behavior during a trip, identifying risky driving patterns and summarizing them with safety scores. This feature tracks both real-time and session-level driving events, such as harsh braking, cornering, or ignoring traffic signs, and evaluates overall risk using multiple criteria. - [Fleet management](/docs/cpp/guides/fleet-management.md): Fleet management - [Configuration Parameters](/docs/cpp/guides/fleet-management/configuration-parameters.md): Configuration Parameters class in Fleet Management SDK define key settings that influence the behavior of the route optimization process. These settings determine aspects such as optimization goals, search time limits, and flexibility in handling orders. Proper configuration ensures that the algorithm meets the operational constraints of the routing problem. - [Customers](/docs/cpp/guides/fleet-management/customer.md): The Customer class is a core component of the Fleet Management SDK, allowing users to create, manage, and retrieve customer data. Customers represent entities that place orders and serve as primary points for delivery or pickup. Each customer has a unique identity and a defined location, ensuring accurate routing and logistics optimization. - [Fuel Prices](/docs/cpp/guides/fleet-management/fuel-prices.md): Overview - [Introduction](/docs/cpp/guides/fleet-management/introduction.md) - [Overview](/docs/cpp/guides/fleet-management/introduction/overview.md): Built into the Maps SDK for C++, Magic Lane's Fleet Management SDK provides a high-performance VRP optimization engine - exposing a flexible C++ API that models customers, orders, departures and destinations, vehicles, territories, fuel costs, and custom constraints - to automatically generate cost- and time-efficient fleet and delivery routes, online or offline. - [Progress Tracking](/docs/cpp/guides/fleet-management/introduction/progress-tracking.md): What is a ProgressListener? - [Workflow](/docs/cpp/guides/fleet-management/introduction/workflow.md):