Getting started
Getting started
To integrate TomTomOnlineSDKMaps for iOS into your Xcode project using CocoaPods, specify it in your Podfile:
pod 'TomTomOnlineSDKMaps'
Edit Info.plist and add the service key taken from Online Maps site.
<key>OnlineMap.Key</key>
<string>"your-tomtom-key"</string>
Additionally, there is TomTomOnlineSDKMapsUIExtensions framework with default UI controls and other assets for the map.
To use this framework in your project add it to the podfile (it doesn’t require any key).
pod 'TomTomOnlineSDKMapsUIExtensions'
The basic steps for adding a map are:
-
Set up your project as it is described in DOWNLOADS
-
Create object 'TTMapView'
-
Obtain keys from Info.plist
Initializing Map:
self.mapView = [[TTMapView alloc] initWithFrame:self.view.frame];
self.mapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
self.view = self.mapView;