Commit ced6d846 authored by Deployer's avatar Deployer

Added @3x tiles support.

parent 4fbe2eb2
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = "CedarMaps" s.name = "CedarMaps"
s.version = "0.1.3" s.version = "0.1.4"
s.summary = "Cedar Studio iOS SDK" s.summary = "Cedar Studio iOS SDK"
s.description = "Cedar Studio should write something to introduce their Pod." s.description = "Cedar Studio should write something to introduce their Pod."
s.homepage = "http://cedar.ir" s.homepage = "http://cedar.ir"
......
...@@ -81,9 +81,13 @@ static NSString * const kBaseURL = @"http://api.cedarmaps.com/v1"; ...@@ -81,9 +81,13 @@ static NSString * const kBaseURL = @"http://api.cedarmaps.com/v1";
tileURLString = [tileURLString stringByReplacingOccurrencesOfString:@"{x}" withString:x.stringValue]; tileURLString = [tileURLString stringByReplacingOccurrencesOfString:@"{x}" withString:x.stringValue];
tileURLString = [tileURLString stringByReplacingOccurrencesOfString:@"{y}" withString:y.stringValue]; tileURLString = [tileURLString stringByReplacingOccurrencesOfString:@"{y}" withString:y.stringValue];
if ([[UIScreen mainScreen] scale] > 1.0) { CGFloat scale = [[UIScreen mainScreen] scale];
if (scale > 1.0) {
tileURLString = [tileURLString stringByReplacingOccurrencesOfString:@".png" withString:@"@2x.png"]; tileURLString = [tileURLString stringByReplacingOccurrencesOfString:@".png" withString:@"@2x.png"];
} }
else if (scale > 2.0) {
tileURLString = [tileURLString stringByReplacingOccurrencesOfString:@".png" withString:@"@3x.png"];
}
return [NSURL URLWithString:tileURLString]; return [NSURL URLWithString:tileURLString];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment