Authored by Justin R. Miller

Merge branch 'develop' into ios7

... ... @@ -67,16 +67,10 @@ static RMConfiguration *RMConfigurationSharedInstance = nil;
[request setValue:[[RMConfiguration configuration] userAgent] forHTTPHeaderField:@"User-Agent"];
NSError *internalError = nil;
NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:&internalError];
NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:error];
if ( ! returnData)
{
*error = internalError;
return nil;
}
return [[[self class] alloc] initWithData:returnData encoding:enc];
}
... ... @@ -117,13 +111,13 @@ static RMConfiguration *RMConfigurationSharedInstance = nil;
RMLog(@"reading route-me configuration from %@", path);
NSString *error = nil;
NSError *error = nil;
NSData *plistData = [NSData dataWithContentsOfFile:path];
_propertyList = [NSPropertyListSerialization propertyListFromData:plistData
mutabilityOption:NSPropertyListImmutable
_propertyList = [NSPropertyListSerialization propertyListWithData:plistData
options:NSPropertyListImmutable
format:NULL
errorDescription:&error];
error:&error];
if ( ! _propertyList)
{
... ...
... ... @@ -79,6 +79,8 @@
_infoDictionary = (NSDictionary *)[NSJSONSerialization JSONObjectWithData:[tileJSON dataUsingEncoding:NSUTF8StringEncoding]
options:0
error:nil];
if ( ! _infoDictionary)
return nil;
_tileJSON = tileJSON;
... ... @@ -174,7 +176,8 @@
- (void)dealloc
{
dispatch_release(_dataQueue);
if (_dataQueue)
dispatch_release(_dataQueue);
}
#pragma mark
... ...
... ... @@ -37,7 +37,8 @@
if (self.mapScrollViewDelegate)
[self.mapScrollViewDelegate scrollView:self correctedContentOffset:&contentOffset];
[super setContentOffset:contentOffset];
if ( ! isnan(contentOffset.x) && ! isnan(contentOffset.y))
[super setContentOffset:contentOffset];
}
- (void)setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated
... ... @@ -45,7 +46,8 @@
if (self.mapScrollViewDelegate)
[self.mapScrollViewDelegate scrollView:self correctedContentOffset:&contentOffset];
[super setContentOffset:contentOffset animated:animated];
if ( ! isnan(contentOffset.x) && ! isnan(contentOffset.y))
[super setContentOffset:contentOffset animated:animated];
}
- (void)setContentSize:(CGSize)contentSize
... ...