GLMapStyleParser
@interface GLMapStyleParser : NSObject
GLMapStyleParser is calss to parse style and analyze result of parsing
-
Loads resource from path.
Declaration
Objective-C
+ (GLMapResource)loadResourceFromPath:(nonnull NSString *)path name:(nonnull NSString *)name screenScale:(CGFloat)screenScale;Parameters
pathDirectory from where resource will be loaded
nameName of resource
screenScalescale of screen
-
Initialize parser without resources
Declaration
Objective-C
- (nonnull instancetype)init; -
Initialize parser with resources stored in bundle
Declaration
Objective-C
- (nonnull instancetype)initWithBundle:(nonnull NSBundle *)bundle;Parameters
bundleBundle object with Style.mapcss and images
-
Initialize parser with resources stored in paths First it tries to find resource in first path, then in second and so on.
Declaration
Objective-C
- (nonnull instancetype)initWithPaths:(nonnull NSArray<NSString *> *)paths;Parameters
pathsPaths where style will search for resources
-
Initialize parser with resource block
Declaration
Objective-C
- (nonnull instancetype)initWithBlock:(nonnull GLMapResourceBlock)resourceBlock;Parameters
resourceBlockblock that will provide resources
-
mask to clamp zoom levels
Declaration
Objective-C
@property (atomic, assign, unsafe_unretained, readwrite) uint32_t clampZoomMask; -
All options for @if tests found while parsing.
Declaration
Objective-C
@property (atomic, readonly) NSSet<NSString *> *_Nullable allOptions; -
Error happened while parsing
Declaration
Objective-C
@property (atomic, readonly) NSError *_Nullable error; -
Sets style options
Declaration
Objective-C
- (void)setOptions:(nonnull NSDictionary<NSString *, NSString *> *)options defaultValue:(BOOL)defaultValue;Parameters
optionsvalues for options
defaultValuevalue used for not set options
-
Parses next chunk of style
Declaration
Objective-C
- (BOOL)parseNextBuffer:(nonnull NSData *)data;Parameters
datachunk of style to parse
-
Parses next chunk of style
Declaration
Objective-C
- (BOOL)parseNextString:(nonnull NSString *)string;Parameters
stringchunk of style to parse
-
Finishes parsing @returns returns result of parsing. If error happened returned value is nil. Check error for details
Declaration
Objective-C
- (GLMapVectorCascadeStyle *_Nullable)finish; -
Appends data from
Style.mapcss
in resources and finish parsing @returns returns result of parsing. If error happened returned value is nil. Check error for detailsDeclaration
Objective-C
- (GLMapVectorCascadeStyle *_Nullable)parseFromResources;
Install in Dash
GLMapStyleParser Class Reference