TomTom setup
How to drive TomTom Orbis Maps through MapConductor. The iOS provider matches the Android one feature for feature: marker, polyline, polygon, circle, ground image, raster layer and info bubble.
Before you start
Get an API key
Issue an Orbis Maps API key in the TomTom Developer Portal.
Add TomTom's distribution source
The TomTom Orbis Maps Display SDK is distributed as binary xcframeworks from TomTom's Artifactory. The MapConductor package references them as binary targets, so add TomTom's source to your app's Podfile.
source 'https://api.tomtom.com/maps-sdk-ios/cocoapods'
Add it with Swift Package Manager
Use File > Add Package Dependencies in Xcode and paste the package URL.
https://github.com/MapConductor/ios-for-tomtom
dependencies: [
.package(url: "https://github.com/MapConductor/ios-sdk-core", from: "1.1.4"),
.package(url: "https://github.com/MapConductor/ios-for-tomtom", from: "1.0.0"),
],
targets: [
.target(
name: "YourApp",
dependencies: [
.product(name: "MapConductorCore", package: "ios-sdk-core"),
.product(name: "MapConductorForTomTom", package: "ios-for-tomtom"),
]
),
]Hand over the API key
Pass it per view, or put it in Info.plist.
// Per view TomTomMapView(state: state, apiKey: "YOUR_TOMTOM_API_KEY")
<key>TomTomAPIKey</key> <string>YOUR_TOMTOM_API_KEY</string>
VERIFY
What you should see
The setup is complete when the map and its marker render — and a draggable marker can be dragged.
import SwiftUI
import MapConductorCore
import MapConductorForTomTom
struct ContentView: View {
@StateObject var state = TomTomMapViewState(
mapDesignType: TomTomMapDesign.Standard,
cameraPosition: MapCameraPosition(
position: GeoPoint(latitude: 52.3676, longitude: 4.9041),
zoom: 11
)
)
var body: some View {
TomTomMapView(state: state) {
Marker(state: MarkerState(
position: GeoPoint(latitude: 52.3676, longitude: 4.9041),
icon: DefaultMarkerIcon(label: "Amsterdam"),
draggable: true
))
}
}
}Map designs
TomTomMapDesign maps onto the Orbis Maps standard styles.
Troubleshooting
The map stays blank
- Check either the view's apiKey or Info.plist's TomTomAPIKey holds a value.
- Check the deployment target is iOS 16.0 or later.
The xcframeworks cannot be found
- The TomTom SDK is a binary distribution — confirm you added TomTom's source to the Podfile.
The build fails
- Clean the build folder (Cmd+Shift+K).
- Delete ~/Library/Developer/Xcode/DerivedData and rebuild.
- Refresh the Swift Package Manager dependencies, and avoid mixing in CocoaPods.
Next
TomTom has no native marker drag, so MapConductor implements it with its own gesture recogniser on the MapView. Zoom is converted to the Google-equivalent scale using the camera latitude.