Getting Started

unl-maps-sdk-ios

Introduction

UNL Maps SDK for iOS is a library for embedding UNL Maps within iOS applications. The Map SDKs are packaged with additional controls to integrate interactive Map controls with an application including but not restricted to zoom, pan, layer overlays, tile selection, and UNL grid controls etc.


compatibility

The UNL Maps SDK for iOS is built with Swift, the official language recommended by Apple for iOS development. Swift is 100% interoperable with Objective C.


Contribution

UNL iOS Sdk is an advance Map SDK library, builld using the core open-source library of MapLibre GL JS. UNL conforms to MapLibre GL licensing terms listed under 3-Clause BSD License.

Getting started

Installing

Add package dependency by following below steps

  • Go to the project -> file -> add Package

  • Search unl-maps-sdk-ios

  • Use “main” branch

  • Click Add packege

Usage in your application

Swift

When using SDK

import UNLMapSDK
                            

Initializing the SDK

Example usage

AppDelegate.swift


                                /// Initializing the UNL SDK
                                let unlSDK = UNLMapSDK()
                            
                                func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
                                    /// Override point for customization after application launch.
                            
                                    /// Configure UNL SDK while launching the App
                                    /// apiKey: and vpmId is mandatory to configure the sdk
                                    /// Set gridControl: flag true to display control, By defaults its false
                                    /// Set tilesSelectorControl: flag true to display inbuilt control, By defaults its false 
                                    unlSDK.configure(apiKey: "<YOUR-UNL-API-KEY>", vpmId: "<YOUR-VPM-ID>", gridControl: true, tilesSelectorControl: true)
                            
                                    return true
                                }
                            
                            

See SDK Authentication Docs for instructions on how to generate an apiKey and vpmId to get started with the UnlSdk.