Map4D SDK
By
Map4D SDK for iOS,使用C++,Objective C/C++编写。
安装
- 使用CocoaPods。
pod repo update
- 更新您的cocoapods本地仓库
pod 'map4dsdk'
添加到Podfile
- 使用
import map4dsdk
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
MFServices.provideAccessKey("98fd21346d83bee24dc734231f7609c9")
return true
}
//....
}
- 提供访问密钥
import UIKit
import map4dsdk
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let mapView = MFMapView(frame: self.view.frame)
view = mapView
}
}
创建地图视图
14. 位置
许可