This repository has been archived by the owner on Nov 11, 2023. It is now read-only.
forked from maplibre/maplibre-native
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMLNSettings.h
62 lines (50 loc) · 1.45 KB
/
MLNSettings.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#import <Foundation/Foundation.h>
#import "MLNFoundation.h"
#import "MLNTileServerOptions.h"
NS_ASSUME_NONNULL_BEGIN
/**
Well-known tile servers
*/
typedef NS_ENUM(NSUInteger, MLNWellKnownTileServer) {
/**
Maptiler
*/
MLNMapTiler,
/**
MapLibre
*/
MLNMapLibre,
/**
Mapbox
*/
MLNMapbox
};
/**
The `MLNSettings` object provides a global way to set SDK properties such
as apiKey, backend URL, etc.
*/
MLN_EXPORT
@interface MLNSettings : NSObject
// MARK: Tile Server Configuration
/**
Tile server options
*/
@property (class, copy, nullable) MLNTileServerOptions* tileServerOptions;
// MARK: Authorizing Access
/**
The API Key used by all instances of `MLNMapView` in the current application.
Setting this property to a value of `nil` has no effect.
@note You must set the API key before attempting to load any style which
requires the token. Therefore, you should generally set it before creating an instance of
`MLNMapView`. The recommended way to set an api key is to add an entry
to your application’s Info.plist file with the key `MLNApiKey`
and the type `String`. Alternatively, you may call this method from your
application delegate’s `-applicationDidFinishLaunching:` method.
*/
@property (class, copy, nullable) NSString *apiKey;
/**
Instructs the SDk to use the give tile server
*/
+ (void)useWellKnownTileServer:(MLNWellKnownTileServer)tileServer;
@end
NS_ASSUME_NONNULL_END