mapfit / iOS-sdk

Other
4 stars 1 forks source link

Mapfit iOS SDK

alt text

Features

Requirements

Installation

CocoaPods

You can use CocoaPods to install Mapfit by adding it to your Podfile:

platform :ios, '11.0'
use_frameworks!
pod 'Mapfit'

Usage example

import Mapfit

Set your API Key

Get an API Key

class AppDelegate: UIResponder, UIApplicationDelegate {
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
      MFTManager.sharedManager.apiKey = "API_KEY"
      return true
    }
}

Create your map

let mapView = MFTMapView(frame: view.bounds)
view.addSubview(mapView)

Add a marker to your map

let marker = mapView.addMarker(position:  CLLocationCoordinate2D(latitude: 40.74699, longitude: -73.98742))

Full Documentation