Authored by Tore Halset
Committed by Michael Tyson

fix compilation on iPhone OS 3.2

... ... @@ -129,7 +129,17 @@
renderer = nil;
imagesOnScreen = nil;
tileLoader = nil;
screenScale = ([[UIScreen mainScreen] respondsToSelector:@selector(scale)] ? [[UIScreen mainScreen] scale] : 1.0);
screenScale = 1.0;
if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
{
Class screenClass = NSClassFromString(@"UIScreen");
if ( screenClass != Nil)
{
id scale = [[screenClass mainScreen] valueForKey:@"scale"];
screenScale = [scale floatValue];
}
}
boundingMask = RMMapMinWidthBound;
... ...
... ... @@ -64,9 +64,14 @@
enableRotation = YES;
isFirstPoint = YES;
if ( [self respondsToSelector:@selector(setContentsScale:)] )
if ( [self respondsToSelector:@selector(setContentsScale:)] )
{
self.contentsScale = ([[UIScreen mainScreen] respondsToSelector:@selector(scale)] ? [[UIScreen mainScreen] scale] : 1.0);
Class screenClass = NSClassFromString(@"UIScreen");
if ( screenClass != Nil)
{
id scale = [[screenClass mainScreen] valueForKey:@"scale"];
[(id)self setValue:scale forKey:@"contentsScale"];
}
}
return self;
... ...