Merge pull request #1599 from mapbox/1596-non-mapbox-tiles
Adding mapbox.com checking to http requests
This commit is contained in:
@@ -154,13 +154,15 @@ void HTTPRequest::start() {
|
||||
@autoreleasepool {
|
||||
|
||||
NSMutableString *url = [NSMutableString stringWithString:@(resource.url.c_str())];
|
||||
if ([[NSUserDefaults standardUserDefaults] integerForKey:@"MGLMapboxAccountType"] == 0) {
|
||||
if ([url rangeOfString:@"?"].location == NSNotFound) {
|
||||
[url appendString:@"?"];
|
||||
} else {
|
||||
[url appendString:@"&"];
|
||||
if ([url rangeOfString:@"mapbox.com"].location != NSNotFound) {
|
||||
if ([[NSUserDefaults standardUserDefaults] integerForKey:@"MGLMapboxAccountType"] == 0) {
|
||||
if ([url rangeOfString:@"?"].location == NSNotFound) {
|
||||
[url appendString:@"?"];
|
||||
} else {
|
||||
[url appendString:@"&"];
|
||||
}
|
||||
[url appendString:@"events=true"];
|
||||
}
|
||||
[url appendString:@"events=true"];
|
||||
}
|
||||
|
||||
NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]];
|
||||
|
||||
Reference in New Issue
Block a user