You can use CocoaPods to install Mapfit
by adding it to your Podfile
:
platform :ios, '11.0'
use_frameworks!
pod 'Mapfit'
import Mapfit
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
MFTManager.sharedManager.apiKey = "API_KEY"
return true
}
}
let mapView = MFTMapView(frame: view.bounds)
view.addSubview(mapView)
let marker = mapView.addMarker(position: CLLocationCoordinate2D(latitude: 40.74699, longitude: -73.98742))