diff --git a/platform/darwin/src/MLNMapSnapshotter.mm b/platform/darwin/src/MLNMapSnapshotter.mm index 079882352..6918f79ff 100644 --- a/platform/darwin/src/MLNMapSnapshotter.mm +++ b/platform/darwin/src/MLNMapSnapshotter.mm @@ -40,6 +40,8 @@ #import "NSBundle+MLNAdditions.h" +#include + const CGPoint MLNLogoImagePosition = CGPointMake(8, 8); const CGFloat MLNSnapshotterMinimumPixelSize = 64; NSString *const MLNSnapshotterAnnotationSpritePrefix = @"org.maplibre.sprites."; @@ -892,8 +894,9 @@ NSArray *MLNAttributionInfosFromAttributions( } // Create the snapshotter - auto localFontFamilyName = - config.localFontFamilyName ? std::string(config.localFontFamilyName.UTF8String) : nullptr; + std::optional localFontFamilyName = + config.localFontFamilyName ? std::optional(std::string(config.localFontFamilyName.UTF8String)) + : std::nullopt; _delegateHost = std::make_unique(self); _mbglMapSnapshotter = std::make_unique( size, pixelRatio, resourceOptions, clientOptions, *_delegateHost, localFontFamilyName); diff --git a/platform/darwin/src/MLNReachability.m b/platform/darwin/src/MLNReachability.m index 6fd10d527..ee41b1e26 100644 --- a/platform/darwin/src/MLNReachability.m +++ b/platform/darwin/src/MLNReachability.m @@ -29,7 +29,6 @@ #import #import -#import #import #import #import diff --git a/platform/ios/src/MLNMapView.mm b/platform/ios/src/MLNMapView.mm index 67f019eea..8109a4d3f 100644 --- a/platform/ios/src/MLNMapView.mm +++ b/platform/ios/src/MLNMapView.mm @@ -6365,7 +6365,7 @@ static void *windowScreenContext = &windowScreenContext; completionHandler:^{ MLNMapView *strongSelf = weakSelf; if (strongSelf.userTrackingState == MLNUserTrackingStateBegan || - strongSelf.userTrackingState == MLNDistanceThresholdForCameraPause) { + strongSelf.userTrackingState == MLNUserTrackingStateBeginSignificantTransition) { strongSelf.userTrackingState = MLNUserTrackingStateChanged; } if (completion) {