MPURITemplate
@interface MPURITemplate : NSObject
Generates an url based on an URI template. Template string must have format prefix{param_1}infix{param_N}suffix
, e.g.: http://tiles.url.com/{floor}/{x}/{y}/{zoom}.png
-
Initialization with template string. Must have format
prefix{param_1}infix{param_N}suffix
, e.g.:http://tiles.url.com/{floor}/{x}/{y}/{zoom}.png
Declaration
Objective-C
- (id)initWithTemplateString:(NSString *)url;
Swift
init!(templateString url: String!)
-
Template string property. Must have format
prefix{param_1}infix{param_N}suffix
, e.g.:http://tiles.url.com/{floor}/{x}/{y}/{zoom}.png
Declaration
Objective-C
@property (assign, readwrite, atomic) NSString *templateURI;
Swift
var templateURI: String! { get set }
-
Get the resulting url string
Declaration
Objective-C
@property (readonly, atomic) NSString *resultURI;
Swift
var resultURI: String! { get }
-
Find the parameter placeholder {name} with given name and replace with given string value
Declaration
Objective-C
- (void)addParam:(NSString *)name value:(NSString *)value;
Swift
func addParam(_ name: String!, value: String!)
-
Find the parameter placeholder {name} with given name and replace with given int value
Declaration
Objective-C
- (void)addIntParam:(NSString *)name value:(int)value;
Swift
func addIntParam(_ name: String!, value: Int32)
-
Reset the url parameters.
Declaration
Objective-C
- (void)resetParams;
Swift
func resetParams()