Reference/Distribution
Distributionstatelessdistribution

[Mappls Map SDK]()

mappls-map-move-ios-distribution-base

mappls-map-move-ios-distribution-base

Integration notice

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-map-move-ios-distribution-base

Why this source is classified stateless

No durable provider record or application workflow contract was established from the source identity or bounded document evidence; view, camera, callback, and authentication sessions alone do not make a source stateful.

Authority: Conservative Default · No durable-state signal promoted from incidental vocabulary
Platforms

iOS

Product areas

MapsSearch PlacesRoutes NavigationTracking TelematicsWidgets Deep LinksCapture FeedbackIdentity Platform

Languages found

TextSwiftObjective-C

Authentication signals

Oauth2Api Key

Prepare the integration

  1. An iOS project with Xcode and the package manager required by the source release
  2. OAuth client credentials issued for the intended Mappls project
  3. A Mappls project key restricted to the intended app, domain, or backend
  4. The corresponding product entitlement enabled for the developer application
Production guardrailsPin package versions and record the source fingerprint.Keep server credentials out of client binaries and logs.Test failures, timeouts, quota limits, upgrades, and rollback.Validate legacy examples against current authentication contracts.

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.

mappls-map-move-ios-distribution-base examples
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
    <string>Your location is required</string>
    <key>NSLocationAlwaysUsageDescription</key>
    <string>Your location is required</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>Your location is required</string>

Topics documented by the source

01Introduction

This repository contains a sample project of an app built for iOS, which is based on Mappls's Map and other differennt SDKs.

Welcome to the Mappls iOS SDK

Explore the largest directory of APIs & SDKs for maps, routes and search.

Mappls's APIs, SDKs, and live updating map data available for 238 nations give developers tools to build better mapping, navigation, and search experiences across platforms.

In this section you will find documentation for :-

• Detailed information about integration of Vector iOS Map. - REST APIs module is a custom module for developers to consume our RESTful APIs within their applications, easily, and without having to develop such functionality from scratch. - Detailed information related to how to integrate Mappls Widgets.

02Map SDK

MapplsMap is a SDK to display map, mark locations, enhance with custom data and even draw routes or other shapes on top.

03Getting Started

Mappls's Map SDK for iOS lets you easily add Mappls Map and web services to your own iOS app. Mappls's Map SDK for iOS supports iOS SDK 9.0 and above and Xcode 10.1 or later. You can have a look at the map and features you will get in your own app by using the Mappls's Maps app for iOS. The SDK handles map tiles download and their display along with a bunch of controls and native gestures.

04Create a new project in Xcode.

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.

05Dependencies

This library depends upon MapplsAPICore, MapplsAPIKit. All dependent libraries will be automatically.

• For iOS9 or later, make this change to your info.plist (Project target > info.plist > Add row and set keys NSLocationAlwaysAndWhenInUseUsageDescription, NSLocationWhenInUseUsageDescription, NSLocationAlwaysUsageDescription). As follows

Message should be appropriate, according to use of your application.

06MapplsMap

A class MapplsMapAuthenticator can be used to authorize the Map.

It is recommended to call this method before initilizing MapplsMapView.

Note: Although authorization of Map is done internally on initilizing MapplsMapView, Using this in advance will reduce map loading time

07Add a Mappls Map View

Map View on view controller can be added either using interface builder or programmatically.

08By Interface Builder

In a storyboard, add a view to your View Controller. In the Identity inspector, change its class to MapplsMapView. Note :- Map style url need to be set at the time of load map

09By Programmatically

To add map on view Controller create an instance of MapplsMapView. and add this to view of ViewController.

10Swift

Note Also to handle app transport security exception add NSAppTransportSecurity in Info.plist of your project. As follows:

11Set Zoom Level

Set zoom to 4 for country level display and 18 for house number display.

12Set Map Center

To set Center of map reference code is below:

13Current Location

To show user's current location on map, use property .showsUserLocation. and set its value to true.

14Swift

To get current location, use property .userLocation. its of type MGLUserLocation which contains location property.

15Tracking Mode

To move map with user location change use property userTrackingMode. Its an enum property of type .MGLUserTrackingMode.. You can set any value from following:

• followWithCourse - followWithHeading - none

16Map Events

The Map object should implement the methods of the MapplsMapViewDelegate protocol corresponding to the events you wish it to receive. This delegate can also be used to detect map overlays selection. Delegate handles gesture events, tap on annotation (marker) and map center coordinates.

17-authorizationCompleted:withError:

This delegate function will be called whenever authorization process of map completed. It gives either sucess or error

18-mapViewWillStartLoadingMap:

Tells the delegate that the map view will begin to load.

This method is called whenever the map view starts loading, including when a new style has been set and the map must reload.

19-mapViewDidFinishLoadingMap:

Tells the delegate that the map view has finished loading.

This method is called whenever the map view finishes loading, either after the initial load or after a style change has forced a reload.

20-mapViewDidFailLoadingMap:withError:

Tells the delegate that the map view was unable to load data needed for displaying the map.

This method may be called for a variety of reasons, including a network connection failure or a failure to fetch the style from the server. You can use the given error message to notify the user that map data is unavailable.

21-mapViewWillStartRenderingFrame:

Tells the delegate that the map view is about to redraw.

This method is called any time the map view needs to redraw due to a change in the viewpoint or style property transition. This method may be called very frequently. Therefore, your implementation of this method should be as lightweight as possible to avoid affecting performance.

22-mapViewDidFinishRenderingFrame:fullyRendered:

Tells the delegate that the map view has just redrawn.

This method is called any time the map view needs to redraw due to a change in the viewpoint or style property transition. This method may be called very frequently. Therefore, your implementation of this method should be as lightweight as possible to avoid affecting performance.

23-mapViewDidBecomeIdle:

Tells the delegate that the map view is entering an idle state, and no more drawing will be necessary until new data is loaded or there is some interaction with the map.

24-mapView:didFinishLoadingStyle:

Tells the delegate that the map has just finished loading a style.

This method is called during the initialization of the map view and after any subsequent loading of a new style.

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://github.com/mappls-api/mapmyindia-rest-api/blob/master/docs/countryISO.mdhttps://developer.apple.com/documentation/xcode/adding-package-dependencies-to-your-app).https://github.com/mappls-api/mappls-ios-sdk/Mappls-Safety-Strip).https://developer.apple.com/documentation/swiftui/uiviewrepresentablehttps://www.mapmyindia.com/api/img/logos1/PhonePe.png)![](https://www.mapmyindia.com/api/img/logos1/Arya-Omnitalk.png)![](https://www.mapmyindia.com/api/img/logos1/delhivery.png)![](https://www.mapmyindia.com/api/img/logos1/hdfc.png)![](https://www.mapmyindia.com/api/img/logos1/TVS.png)![](https://www.mapmyindia.com/api/img/logos1/Paytm.png)![](https://www.mapmyindia.com/api/img/logos1/FastTrackz.png)![](https://www.mapmyindia.com/api/img/logos1/ICICI-Pru.png)![](https://www.mapmyindia.com/api/ihttps://about.mappls.com/api/https://about.mappls.com/contact/https://stackoverflow.com/questions/tagged/mappls-api)[![](https://www.mapmyindia.com/api/img/icons/blog.png)](https://about.mappls.com/blog/)[![](https://www.mapmyindia.com/api/img/icons/gethub.png)](https://github.com/mappls-api)[https://www.npmjs.com/org/mapmyindiahttps://www.facebook.com/Mapplsofficial)[![](https://www.mapmyindia.com/june-newsletter/icon2.png)](https://twitter.com/mappls)[![](https://www.mapmyindia.com/newsletter/2017/aug/llinkedin.png)](https://www.linkedin.com/company/mappls/)[![](https://www.mapmyindia.com/june-newsletter/icon3.png)](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