forked from organicmaps/organicmaps
Review fixes.
This commit is contained in:
parent
e2c39daa01
commit
3d60441c0e
2 changed files with 17 additions and 5 deletions
|
@ -5,10 +5,13 @@
|
|||
|
||||
#include "std/map.hpp"
|
||||
|
||||
static CGFloat const kLineWidth = 2.0;
|
||||
static NSString * const kAnimationKey = @"CircleAnimation";
|
||||
namespace
|
||||
{
|
||||
CGFloat const kLineWidth = 2.0;
|
||||
NSString * const kAnimationKey = @"CircleAnimation";
|
||||
|
||||
static inline CGFloat angleWithProgress(CGFloat progress) { return 2.0 * M_PI * progress - M_PI_2; }
|
||||
CGFloat angleWithProgress(CGFloat progress) { return 2.0 * M_PI * progress - M_PI_2; }
|
||||
} // namespace
|
||||
@interface MWMCircularProgressView ()
|
||||
|
||||
@property(nonatomic) CAShapeLayer * backgroundLayer;
|
||||
|
|
|
@ -129,7 +129,7 @@ bool isMarkerPoint(MWMRoutePoint const & point) { return point.IsValid() && !poi
|
|||
|
||||
- (void)rebuildWithBestRouter:(BOOL)bestRouter
|
||||
{
|
||||
[self.altitudeImagesData removeAllObjects];
|
||||
[self clearAltitudeImagesData];
|
||||
|
||||
if (self.startPoint.IsMyPosition())
|
||||
{
|
||||
|
@ -249,7 +249,7 @@ bool isMarkerPoint(MWMRoutePoint const & point) { return point.IsValid() && !poi
|
|||
|
||||
- (void)doStop
|
||||
{
|
||||
[self.altitudeImagesData removeAllObjects];
|
||||
[self clearAltitudeImagesData];
|
||||
GetFramework().CloseRouting();
|
||||
MapsAppDelegate * app = [MapsAppDelegate theApp];
|
||||
app.routingPlaneMode = MWMRoutingPlaneModeNone;
|
||||
|
@ -298,9 +298,18 @@ bool isMarkerPoint(MWMRoutePoint const & point) { return point.IsValid() && !poi
|
|||
|
||||
UIImage * altitudeImage = [UIImage imageWithRGBAData:imageData width:width height:height];
|
||||
if (altitudeImage)
|
||||
{
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
block(altitudeImage);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
- (void)clearAltitudeImagesData
|
||||
{
|
||||
dispatch_async(self.renderAltitudeImagesQueue, ^{
|
||||
[self.altitudeImagesData removeAllObjects];
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue