From 27e33ef8b85c2c717410dd4b1ea32eb9cf980a5c Mon Sep 17 00:00:00 2001 From: "Justin R. Miller" Date: Thu, 10 Apr 2014 11:20:20 -0700 Subject: [PATCH 1/3] log failed tile for more info --- src/map/tile_data.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/tile_data.cpp b/src/map/tile_data.cpp index 26ffdedb1..a782a5a95 100644 --- a/src/map/tile_data.cpp +++ b/src/map/tile_data.cpp @@ -58,7 +58,7 @@ void TileData::request() { tile->data.swap(res.body); tile->parse(); } else { - fprintf(stderr, "tile loading failed\n"); + fprintf(stderr, "tile loading failed (%s)\n", url.c_str()); } }, []() { platform::restart(); From 9f5a313e3749d3338638c75c547be550d5b5615b Mon Sep 17 00:00:00 2001 From: "Justin R. Miller" Date: Thu, 10 Apr 2014 11:28:43 -0700 Subject: [PATCH 2/3] update supported iOS orientations --- ios/Info.plist | 2 ++ ios/MBXViewController.mm | 9 +++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ios/Info.plist b/ios/Info.plist index 04873d9d3..d78b5428e 100644 --- a/ios/Info.plist +++ b/ios/Info.plist @@ -31,6 +31,8 @@ UISupportedInterfaceOrientations UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight UISupportedInterfaceOrientations~ipad diff --git a/ios/MBXViewController.mm b/ios/MBXViewController.mm index 140de2ebd..87373b120 100644 --- a/ios/MBXViewController.mm +++ b/ios/MBXViewController.mm @@ -162,12 +162,9 @@ class MBXMapView } } -- (BOOL)shouldAutorotate { - return YES; -} - -- (NSUInteger)supportedInterfaceOrientations { - return UIInterfaceOrientationMaskAll; +- (NSUInteger)supportedInterfaceOrientations +{ + return ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad ? UIInterfaceOrientationMaskAll : UIInterfaceOrientationMaskAllButUpsideDown); } -(void)viewWillLayoutSubviews { From 9ccfc1975c88c683e3beb27e86acc48a79d93e51 Mon Sep 17 00:00:00 2001 From: "Justin R. Miller" Date: Thu, 10 Apr 2014 11:30:27 -0700 Subject: [PATCH 3/3] fix tool palette during device rotations --- ios/MBXViewController.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/MBXViewController.mm b/ios/MBXViewController.mm index 87373b120..dcaa5ba42 100644 --- a/ios/MBXViewController.mm +++ b/ios/MBXViewController.mm @@ -146,7 +146,7 @@ class MBXMapView paletteWidth, paletteHeight)]; self.palette.backgroundColor = [UIColor colorWithWhite:0 alpha:alpha]; - self.palette.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin; + self.palette.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin; self.palette.layer.cornerRadius = bufferSize; [self.view addSubview:self.palette]; for (NSString *selectorName in selectorNames)