`Map` should be able to deal with having no access token or JSON even while it’s running. Most of `Map` accounts for this situation, but `reloadStyle()` incorrectly assumes that one or the other is set. This change corrects the assumption in `reloadStyle()`. Also expose the access token and style name to clients as ordinary KVO-compliant properties. Actually, they’re not so ordinary because they’re inspectable! Ref #1070, #1147
9 lines
173 B
Objective-C
9 lines
173 B
Objective-C
#import <Foundation/Foundation.h>
|
|
|
|
@interface NSString (MGLAdditions)
|
|
|
|
/// Returns the receiver if non-empty or \c nil if empty.
|
|
- (NSString *)mgl_stringOrNilIfEmpty;
|
|
|
|
@end
|