Switching the Tile Server

If you have access tokens for both TomTom and NextBillion MapTile, you can choose which tile server the SDK uses.

Enum

1
typedef NS_ENUM(NSUInteger, NGLWellKnownTileServer) {
2
/**
3
* NextBillion MapTile tile server
4
*
5
* Use this type when your access token only supports NextBillion MapTile services.
6
* NextBillion MapTile provides high-quality vector tiles with global coverage.
7
* Requires a NextBillion MapTile API key for authentication.
8
*/
9
NGLMapTiler,
10
11
/**
12
* NextBillion TomTom tile server
13
*
14
* Use this type when your access token supports NextBillion TomTom mapping services.
15
* NextBillion provides mapping services powered by TomTom’s infrastructure.
16
* Offers global coverage with high performance and reliability.
17
*/
18
NGLTomTom
19
};

Default: The SDK uses TomTom as the default tile server.

Set the Tile Server at App Launch

Configure the tiler server in your application entry point (e.g., -application:didFinishLaunchingWithOptions: ).

Swift

1
func application(
2
_ application: UIApplication,
3
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
4
) -> Bool {
5
// Switch to NextBillion MapTile at startup
6
NGLAccountManager.use(.mapTiler)
7
return true
8
}

Objective-C

1
// AppDelegate.m
2
- (BOOL)application:(UIApplication *)application
3
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
4
// Switch to NextBillion MapTile at startup
5
[NGLAccountManager use:NGLWellKnownTileServer.NGLMapTiler]; // if your SDK exposes an Obj-C bridge
6
return YES;
7
}

Token matching: Make sure the access token (API key) you supply matches the provider you select. Tokens are not interchangeable between TomTom and NextBillion MapTile.