Skip to content

Latest commit

 

History

History
69 lines (51 loc) · 1.5 KB

File metadata and controls

69 lines (51 loc) · 1.5 KB

Map4D Services SDK

map4d platform cocoapods

Map4D Services SDK brings the Map4D API Services for your iOS Application

Installation

Use CocoaPods.

  1. Update your cocoapods local repo
pod repo update
  1. Add to Podfile
pod 'Map4dServices'

Provide access key

Edit Info.plist and add Map4d services access key

<key>Map4dServicesAccessKey</key>
<string>YOUR_SERVICES_ACCESS_KEY</string>

Example

Get place detail

** Swift **

let service = MFPlacesService()
service.fetchPlaceDetail(withPlaceId: "60dd3850f81cb14bc880ed52") { result, error in
  guard let result = result else {
    dump(error)
    return
  }
  print("name \(result.name)")
}

** Objective C **

MFPlacesService* service = [[MFPlacesService alloc] init];
[service fetchPlaceDetailWithPlaceId:placeId completionHandler:^(id<MFPlaceDetailResult> _Nullable result, id<MFServiceError>  _Nullable error) {
  if (error != nil) {
    NSLog(@"code: %@, message: %@", error.code, error.message);
  }
  else {
    NSLog(@"name: %@", result.name);
  }
}];

License

Copyright (C) 2022 IOT Link Ltd. All Rights Reserved.