[ios, macos] Removed MGLSource.sourceType (#6028)

Fixes #6027.
This commit is contained in:
Minh Nguyễn
2016-08-16 02:10:56 -07:00
committed by GitHub
parent 18176605f6
commit dcd9e1016c
4 changed files with 4 additions and 11 deletions

View File

@@ -12,12 +12,9 @@
@implementation MGLGeoJSONSource
static NSString *MGLGeoJSONSourceType = @"geojson";
static NSString *MGLGeoJSONDataKey = @"data";
- (instancetype)initWithSourceIdentifier:(NSString *)sourceIdentifier URL:(NSURL *)url
{
if (self = [super initWithSourceIdentifier:sourceIdentifier sourceType:MGLGeoJSONSourceType]) {
if (self = [super initWithSourceIdentifier:sourceIdentifier]) {
_URL = url;
if (url.isFileURL) {
_data = [[NSString alloc] initWithContentsOfURL:url encoding:NSUTF8StringEncoding error:NULL];

View File

@@ -6,10 +6,8 @@
@implementation MGLRasterSource
static NSString *MGLRasterSourceType = @"raster";
- (instancetype)initWithSourceIdentifier:(NSString *)sourceIdentifier URL:(NSURL *)url tileSize:(CGFloat)tileSize {
if (self = [super initWithSourceIdentifier:sourceIdentifier sourceType:MGLRasterSourceType]) {
if (self = [super initWithSourceIdentifier:sourceIdentifier]) {
_URL = url;
_tileSize = tileSize;
}

View File

@@ -4,8 +4,7 @@
@interface MGLSource : NSObject
@property (nonatomic, copy) NSString *sourceIdentifier;
@property (nonatomic, copy) NSString *sourceType;
- (instancetype)initWithSourceIdentifier:(NSString *)sourceIdentifier sourceType:(NSString *)sourceType;
- (instancetype)initWithSourceIdentifier:(NSString *)sourceIdentifier;
@end

View File

@@ -4,10 +4,9 @@
@implementation MGLSource
- (instancetype)initWithSourceIdentifier:(NSString *)sourceIdentifier sourceType:(NSString *)sourceType {
- (instancetype)initWithSourceIdentifier:(NSString *)sourceIdentifier {
if (self = [super init]) {
_sourceIdentifier = sourceIdentifier;
_sourceType = sourceType;
}
return self;
}