Skip to content

MapmyIndia/mapmyindia-maps-rasterSDK-ios-sample-withREST

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MapmyIndia APIs

MapmyIndia Raster Maps iOS SDK

MapmyIndia’s iOS Map SDK helps to embed MapmyIndia maps within your iOS application. Through customized raster tiles, you can add different map layers to your application and add bunch of controls and gestures to enhance map usability thus creating potent map based solutions for your customers.

Your MapmyIndia Maps SDK usage needs a set of license keys (get them here ) and is governed by the API terms and conditions.

As part of the terms and conditions, you cannot remove or hide the MapmyIndia logo and copyright information in your project.

Please see branding guidelines on MapmyIndia website for more details.

The allowed SDK hits are described on the plans page. Note that your usage is

shared between platforms, so the API hits you make from a web application, Android app or an iOS app all add up to your allowed daily limit.

Create a new project in Xcode.

  • Drag and drop the MapmyIndia Map SDK Framework (Mapbox.framework) to your project. It must be added in embedded binaries.

  • Drag and drop the MapmyIndiaAPIKit Framework to your project. It must be added in embedded binaries. It is a dependent framework.

  • In the Build Phases tab of the project editor, click the + button at the top and select .New Run Script Phase.. Enter the following code into the script text field: bash ${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mapbox.framework/strip-frameworks.sh

  • For iOS9 or later, make this change to your

info.plist (Project target > info.plist > Add row and set key NSLocationWhenInUseUsageDescription, NSLocationAlwaysUsageDescription)

Add your MapmyIndia Map API keys to your AppDelegate.m as follows- 1. Add the following import statement.


    #import <MMIFramework/MMIFramework.h>
    

2.Add the following to your application:didFinishLaunchingWithOptions: method, replacing restAPIKey and mapSDKKey with your own API keys:


[LicenceManager sharedInstance].restAPIKey=your_rest_api_key;
[LicenceManager sharedInstance].mapSDKKey=your_java_script_key;

  1. Add the following import statement.

Objective-C

#import <MapmyIndiaAPIKit/MapmyIndiaAPIKit.h>

Swift

import MapmyIndiaAPIKit

To initialize SDK you have to set required keys. You can achieve this using

two ways:

First Way (Preferred)

By adding following keys in Info.plist file of your project MapmyIndiaSDKKey, MapmyIndiaRestKey, MapmyIndiaAtlasClientId, MapmyIndiaAtlasClientSecret, MapmyIndiaAtlasGrantType.

Second Way

You can also set these required keys programmatically.

Add the following to your application:didFinishLaunchingWithOptions: method, replacing restAPIKey and mapSDKKey with your own API keys:

Objective-C

[MapmyIndiaAccountManager setMapSDKKey:@"MAP SDK_KEY"];
[MapmyIndiaAccountManager setRestAPIKey:@"REST API_KEY"];
[MapmyIndiaAccountManager setAtlasClientId:@"ATLAS CLIENT_ID"];
[MapmyIndiaAccountManager setAtlasClientSecret:@"ATLAS CLIENT_SECRET"];
[MapmyIndiaAccountManager setAtlasGrantType:@"GRANT_TYPE"]; //always put client_credentials
[MapmyIndiaAccountManager setAtlasAPIVersion:@"1.3.11"]; // Optional; deprecated

Swift

MapmyIndiaAccountManager.setMapSDKKey("MAP SDK_KEY")
MapmyIndiaAccountManager.setRestAPIKey("REST API_KEY")
MapmyIndiaAccountManager.setAtlasClientId("ATLAS CLIENT_ID")
MapmyIndiaAccountManager.setAtlasClientSecret("ATLAS CLIENT_SECRET")
MapmyIndiaAccountManager.setAtlasGrantType("GRANT_TYPE") //always put client_credentials
MapmyIndiaAccountManager.setAtlasAPIVersion("1.3.11") // Optional; deprecated

For usage of SDK go to here

For any queries and support, please contact:

Email

Email us at apisupport@mapmyindia.com

Stack Overflow

Ask a question under the mapmyindia-api

Support

Need support? contact us!

Blog

Read about the latest updates & customer stories

© Copyright 2019. CE Info Systems Pvt. Ltd. All Rights Reserved. | Terms & Conditions

mapbox-gl-native copyright (c) 2014-2019 Mapbox.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages