@@ -4,6 +4,10 @@ MapLibre welcomes participation and contributions from everyone. Please read [`C
|
||||
|
||||
## main
|
||||
|
||||
## (unreleased)
|
||||
|
||||
- Temporary workaround for map display freeze / stutter when using annotation views with Metal backend. [Issue 2117](https://github.com/maplibre/maplibre-native/issues/2117) fixed by [PR 2148](https://github.com/maplibre/maplibre-native/pull/2148)
|
||||
|
||||
## 6.2.0
|
||||
|
||||
- Add support for [multi sprites](https://github.com/maplibre/maplibre-native/pull/1858). More information on this feature can be found in the [Style Spec Documentation](https://maplibre.org/maplibre-style-spec/sprite/#multiple-sprite-sources).
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||
{
|
||||
#ifndef MLN_DISABLE_LOGGING
|
||||
#ifndef MLN_LOGGING_DISABLED
|
||||
[MLNLoggingConfiguration sharedConfiguration].loggingLevel = MLNLoggingLevelFault;
|
||||
#endif
|
||||
[MLNSettings useWellKnownTileServer:MLNMapTiler];
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
- (BOOL)application:(UIApplication*)application
|
||||
didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
|
||||
|
||||
#ifndef MLN_DISABLE_LOGGING
|
||||
#ifndef MLN_LOGGING_DISABLED
|
||||
[MLNLoggingConfiguration sharedConfiguration].loggingLevel = MLNLoggingLevelFault;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6974,17 +6974,14 @@ static void *windowScreenContext = &windowScreenContext;
|
||||
|
||||
if (annotationView)
|
||||
{
|
||||
CLLocationCoordinate2D coordinate = annotation.coordinate;
|
||||
annotationView.center = MLNPointRounded([self convertCoordinate:annotationContext.annotation.coordinate toPointToView:self]);
|
||||
|
||||
// Every so often (1 out of 1000 frames?) the mbgl query mechanism fails. This logic spot checks the
|
||||
// offscreenAnnotations values -- if they are actually still on screen then the view center is
|
||||
// moved and the enqueue operation is avoided. This allows us to keep the performance benefit of
|
||||
// using the mbgl query result. It also forces views that have just gone offscreen to be cleared
|
||||
// fully from view.
|
||||
if (MLNCoordinateInCoordinateBounds(coordinate, coordinateBounds))
|
||||
{
|
||||
annotationView.center = [self convertCoordinate:annotationContext.annotation.coordinate toPointToView:self];
|
||||
}
|
||||
else
|
||||
if (!MLNCoordinateInCoordinateBounds(annotation.coordinate, coordinateBounds))
|
||||
{
|
||||
if (annotationView.layer.animationKeys.count > 0) {
|
||||
continue;
|
||||
@@ -6995,7 +6992,11 @@ static void *windowScreenContext = &windowScreenContext;
|
||||
adjustedCenter.x = -CGRectGetWidth(self.frame) * 10.0;
|
||||
annotationView.center = adjustedCenter;
|
||||
|
||||
[self enqueueAnnotationViewForAnnotationContext:annotationContext];
|
||||
// Disable the offscreen annotation view recycling on Metal because of issue https://github.com/maplibre/maplibre-native/issues/2117
|
||||
// TLDR: Metal view rendering stutter / freeze
|
||||
#if !MLN_RENDER_BACKEND_METAL
|
||||
[self enqueueAnnotationViewForAnnotationContext:annotationContext];
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user