Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

On iOS 14 MGLAnnotationView slows down map significantly #16513

Closed
flashspys opened this issue Jul 24, 2020 · 1 comment
Closed

On iOS 14 MGLAnnotationView slows down map significantly #16513

flashspys opened this issue Jul 24, 2020 · 1 comment

Comments

@flashspys
Copy link
Contributor

flashspys commented Jul 24, 2020

The addition of even one custom MGLAnnotationView make the map unusable. The attached image shows the profiler where the mapbox rendering call is taking the most of the cpu. There is only a basic map showing one custom annotation. On iOS 13 this runs butter smooth. The Map is displayed via a UIViewRepresentable in SwiftUI.

image

Steps to reproduce

  1. On iOS 14, create a MGLMapView and display one custom MGLAnnotationView.

Expected behavior

Map runs smooth

Actual behavior

Map is unusable slow

Configuration

The used custom MGLAnnotationView:

class CustomAnnotationView: MGLAnnotationView {
    override func layoutSubviews() {
        super.layoutSubviews()
        layer.cornerRadius = bounds.width / 2
        layer.borderWidth = 2
        layer.borderColor = UIColor.white.cgColor
    }
}

Mapbox SDK version: 6.0.0
iOS versions: iPad OS 14 / iOS 13.6
Device/simulator models: iPad Pro 1st Gen (iOS 14 device) / iPhone Xs (iOS 13 device)
Xcode version: 12.0 b2

@flashspys
Copy link
Contributor Author

Wrong repo, I'm sorry. Reopened here: mapbox/mapbox-gl-native-ios#350

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant