blob: 08a34338b1c10f40ce7e3af0421033155caa3ab0 (
plain)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
#import <Foundation/Foundation.h>
#import "MGLTypes.h"
NS_ASSUME_NONNULL_BEGIN
/** These constants represent the scheme that the tile URL templates will use. */
typedef NS_ENUM(NSUInteger, MGLTileSetScheme) {
MGLTileSetSchemeXYZ = 0,
MGLTileSetSchemeTMS
};
/**
The `MGLTileSet` class holds the tile URL template strings and associated
configuration for those strings. It can be passed to an `MGLVectorSource` or
`MGLRasterSource` instead of an `NSURL` representing a TileJSON URL to create a
source.
*/
@interface MGLTileSet : NSObject
/**
An `NSArray` of `NSString` objects that represent the tile templates.
*/
@property (nonatomic, copy) NS_ARRAY_OF(NSString *) *tileURLTemplates;
/**
An `NSNumber` object containing an integer; specifies the minimum zoom level at
which the source will display tiles. The value should be in the range of 0 to
22. The default value is 0 and the source will use the default value
if `minimumZoomLevel` is nil.
*/
@property (nonatomic, nullable) NSNumber *minimumZoomLevel;
/**
An `NSNumber` object containing an integer; specifies the maximum zoom level at
which to display tiles. The value should be in the range of 0 to 22 and greater
than `minimumZoomLevel`. The default value is 22 and the source will use the
default value if `maximumZoomLevel` is nil.
*/
@property (nonatomic, nullable) NSNumber *maximumZoomLevel;
/**
An `NSString` object that contains an attribution to be displayed when the map
is shown to a user. The default value is `nil`.
*/
@property (nonatomic, copy, nullable) NSString *attribution;
/**
An `MGLTileSetScheme` value that contains an enumeration (either
`MGLTileSetSchemeXYZ` or `MGLTileSetSchemeTMS`) that influences the y direction
of the tile coordinates. The default is `MGLTileSetSchemeXYZ`.
*/
@property (nonatomic) MGLTileSetScheme scheme;
/**
Initializes and returns a new tile set object.
@param tileURLTemplates An `NSArray` of `NSString` objects that represent the
tile templates.
@return The initialized tile set object.
*/
- (instancetype)initWithTileURLTemplates:(NS_ARRAY_OF(NSString *) *)tileURLTemplates;
/**
Initializes and returns a new tile set object.
@param tileURLTemplates An `NSArray` of `NSString` objects that represent the
tile templates.
@param minimumZoomLevel An `NSUInteger`; specifies the minimum zoom level at
which to display tiles.
@param maximumZoomLevel An `NSUInteger`; specifies the maximum zoom level at
which to display tiles.
@return The initialized tile set object.
*/
- (instancetype)initWithTileURLTemplates:(NS_ARRAY_OF(NSString *) *)tileURLTemplates minimumZoomLevel:(NSUInteger)minimumZoomLevel maximumZoomLevel:(NSUInteger)maximumZoomLevel;
@end
NS_ASSUME_NONNULL_END
|