diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-08-16 01:17:11 -0700 |
---|---|---|
committer | Fredrik Karlsson <bjorn.fredrik.karlsson@gmail.com> | 2016-08-16 10:17:11 +0200 |
commit | 1daba5d04b5f6a704a1ee608b64b7bb42101903f (patch) | |
tree | 50f268ad3dfc459f9814ed2a516c8127786a09b3 /platform/darwin/src/NSURL+MGLAdditions.h | |
parent | 6c6ddd9e86d1be7257178ffd123dde5138d6c7b9 (diff) | |
download | qtlocation-mapboxgl-1daba5d04b5f6a704a1ee608b64b7bb42101903f.tar.gz |
[ios, macos] Accept absolute file paths as style URLs (#6026)
It turns out that mbgl::AssetFileSource supports absolute file URLs in addition to relative file URLs. So replace the file: scheme with asset: while percent-escaping as necessary.
Also added amsterdam.geojson to macos.xcodeproj for consistency with ios.xcodeproj.
Diffstat (limited to 'platform/darwin/src/NSURL+MGLAdditions.h')
-rw-r--r-- | platform/darwin/src/NSURL+MGLAdditions.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/platform/darwin/src/NSURL+MGLAdditions.h b/platform/darwin/src/NSURL+MGLAdditions.h new file mode 100644 index 0000000000..70fd79f064 --- /dev/null +++ b/platform/darwin/src/NSURL+MGLAdditions.h @@ -0,0 +1,17 @@ +#import <Foundation/Foundation.h> + +#import "MGLTypes.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface NSURL (MGLAdditions) + +/** + Returns the given URL, modified if necessary to use the asset: URL scheme + expected by mbgl for local requests. + */ +- (nullable NSURL *)mgl_URLByStandardizingScheme; + +@end + +NS_ASSUME_NONNULL_END |