This repository distributes a package rather than defining the complete product contract. Pair it with the owning SDK or product guide.
What this surface enables
Mappls Direction UI Native for iOS distributed via the SPM (Swift Package Manager).
The source identity names a capture, feedback, geofence, analysis, or guided-operation surface where provider calls and application-owned workflow state must be separated.
Authority: Source Identity · Evidence: direction-uiiOS
MapsSearch PlacesRoutes NavigationTracking TelematicsCapture FeedbackIdentity Platform
SwiftObjective-CText
No explicit authentication signal detected
Prepare the integration
- An iOS project with Xcode and the package manager required by the source release
- The corresponding product entitlement enabled for the developer application
Setup and usage examples
These examples were extracted from the canonical public source document and sanitized for credential-like values. Check the source branch and package version before copying into a production application.
let directionVC = MapplsDirectionViewController(for: [MapplsDirectionLocation]())
self.navigationController?.pushViewController(directionVC, animated: false)Operate the whole lifecycle
This operational model supplements the repository-level setup instructions. Adapt its resource names and transitions to the owning product contract.
Create a bounded application request or draft with purpose, policy, revision, and lifecycle owner before provider UI or capture begins.
Give one screen, controller, subscription, or callback generation explicit ownership of configuration, cancellation, timeout, and cleanup.
Treat provider output as a candidate; validate and copy a narrow portable value instead of persisting an opaque SDK or UI object.
Use application-owned versioning, idempotency, review, and audit when a candidate affects a durable business decision.
Stop listeners and native resources once, ignore late generations, and restore only application-owned state after restart.
Topics documented by the source
01Introduction
MapplsDirectionUI SDK provides the UI components to quickly integrate Route API from MapplsAPIKit framework in iOS application. It offers the following basic functionalities:
1. Takes support of Mappls's Place search for searching locations of origin, destinations and via points. 2. It allows to use origin and destinations in Mappls's digital address (semicolon separated) Mappls Pin or WGS 84 geographical coordinates both. 3. The ability to set the vehicle profile like driving, and biking. 4. Easily set the resource for traffic and ETA information.
For details, please contact apisupport@mappls.com.
02Installation
To add a package dependency to your Xcode project, select File > Swift Packages > Add Package Dependency and enter its repository URL. See Adding Package Dependencies to Your App.
Below are list of dependcies which are required to run this SDK:
• MapplsAPICore - MapplsAPIKit - MapplsMaps - MapplsUIWidgets
03Usage
The MapplsDirectionUI makes it easy to integrate Route from MapplsAPIKit SDK to your iOS application. It gives you all the tools you need to add Directions related UI components to your application.
04MapplsDirectionsViewController
MapplsDirectionsViewController is type of UIViewController which you can use to show screen for getting input from user to choose origin and destination and show routes after that.
As from above code you can see it requires an array of object type MapplsDirectionLocation. It can be an blank array to launch screen without any chosen locations.
Also you can pass fixed locations and launch instnace of MapplsDirectionViewController, as shown in below code:
05Configuration
Here are the properties use to configure MapplsDirectionViewController route.
##### Profile Identifier It is instance of enum DirectionsProfileIdentifier which can accepts values driving, walking, biking, trucking. By default its value is driving.
##### Resource Identifier It is instance of enum DirectionsResourceIdentifier which can accepts values routeAdv, routeETA. By default its value is routeAdv.
Note: To use RouteETA ‘resourceIdentifier’ should be routeETA and ‘profileIdentifier’ should be driving. In response of RouteETA a unique identifier to that request will be received which can be get using parameter routeIdentifier of object Route.
##### AttributeOptions AttributeOptions for the route. Any combination of AttributeOptions can be specified. By default, no attribute options are specified.
##### IncludesAlternativeRoutes A Boolean value indicating whether alternative routes should be included in the response. The default value of this property is true.
06showDottedPolylineForWalkingProfile
showDottedPolylineForWalkingProfile is boolean a propery to show dotted or plain polyline for walking profile. Its default value is true.
MapplsDirectionViewController is created using several UI components whose appearance can be changed according to user requirements. Some of them are listed as below:
• MapplsDirectionTopBannerView - MapplsDirectionBottomBannerView
07MapplsDirectionViewControllerDelegates
It is a protocol class which will be used for callback methods as shown below:
08MapplsDirectionTopBannerView
MapplsDirectionTopBannerView is type of UIView which show the source, destination and viapoint locations at the top of MapplsDirectionViewController
This class accepts array of MapplsDirectionLocation from which it set value of source, destination and viapoint.
09MapplsDirectionBottomBannerView
MapplsDirectionBottomBannerView is class of type UIView, it used for showing the route information i.e ArivalTime, DistanceRemening, TimeRemening.
To use this class it takes we need to call a function updateBottomBanner which accepts three parameters i.e route, selectedRoute, locationModel.
• route: It is an array of the Routes which is required to update bottom banner view. - selectedRoute: If you have multiple routes then it will give the selected route in Integer - locationModel: LocationModel is an array of the type MapplsDirectionLocation which is required to manage bottom banner view.
10Our many happy customers:
For any queries and support, please contact:
Email us at apisupport@mappls.com
Support Need support? contact us!
[](https://about.mappls.com/blog/)[](https://github.com/mappls-api)
[](https://twitter.com/mappls)[](https://www.linkedin.com/company/mappls/)[](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7J9HiOA)
@ Copyright 2020 CE Info Systems Pvt. Ltd. All Rights Reserved.
Service references found
URLs are sanitized during ingestion and may include documentation or legacy hosts. Use them to trace the source, not as a substitute for the current API contract.
https://www.mapmyindia.com/apihttps://developer.apple.com/documentation/xcode/adding-package-dependencies-to-your-app).https://www.mapmyindia.com/api/img/logos1/PhonePe.png)[](https://about.mappls.com/blog/)[](https://github.com/mappls-api)[https://www.npmjs.com/org/mapmyindiahttps://www.facebook.com/Mapplsofficial)[](https://twitter.com/mappls)[](https://www.linkedin.com/company/mappls/)[](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOAhttps://about.mappls.com/api/terms-&-conditionshttps://www.mappls.com/about/privacy-policyhttps://www.mappls.com/pdf/mappls-sustainability-policy-healt-labour-rules-supplir-sustainability.pdfhttps://www.mappls.com/pdf/Health-Safety-Management.pdfhttps://www.mappls.com/pdf/Environment-Sustainability-Policy-CSR-Report.pdf