Skip to content

Commit

Permalink
Style switching delay fix when annotations are visible (#2395)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcristici authored May 17, 2024
1 parent 33a1e16 commit 0d3b1d7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions platform/ios/src/MLNMapView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -6955,6 +6955,13 @@ - (void)updateAnnotationViews

if (annotationView)
{
// Reset the center to zero in order to force the annotation view to redraw even when is not moving.
// This will force somehow the map view to display the rendered drawable for older devices.
// This is a fix for the following issues:
// https://github.com/maplibre/maplibre-native/issues/2337
// https://github.com/maplibre/maplibre-native/issues/2380
annotationView.center = CGPointZero;

annotationView.center = MLNPointRounded([self convertCoordinate:annotationContext.annotation.coordinate toPointToView:self]);
haveVisibleAnnotationViews = true;
}
Expand Down

0 comments on commit 0d3b1d7

Please sign in to comment.