Open bilics opened 4 years ago
Hi @fabian-guerra!
Can you please clarify something:
Mapbox stops updating (calling func updateUIView()) when for any new added annotation when a Text("\(annotations.count)") is added above the MapView() call like bellow:
func updateUIView()
Text("\(annotations.count)")
VStack { Text("\(annotations.count)") MapView(annotations: $annotations).centerCoordinate(.init(latitude: 37.791293, longitude: -122.396324)).zoomLevel(16) Button(action: { self.annotations.append( MGLPointAnnotation(title: "Mapbox 1", coordinate: .init(latitude: 37.791400, longitude: -122.396200))) }) { Text("Add annotation") } ... }
Does this have to do with the SwiftUI propagation and new UI update pattern? Or am I doing something wrong?
Thanks for any insights (or for pointing out what I am doing wrong).
Best regards,
ps.: I commented this problem here https://github.com/mapbox/mapbox-maps-swiftui-demo/issues/3#issuecomment-600902173
Hi @fabian-guerra!
Can you please clarify something:
Mapbox stops updating (calling
func updateUIView()
) when for any new added annotation when aText("\(annotations.count)")
is added above the MapView() call like bellow:Does this have to do with the SwiftUI propagation and new UI update pattern? Or am I doing something wrong?
Thanks for any insights (or for pointing out what I am doing wrong).
Best regards,
ps.: I commented this problem here https://github.com/mapbox/mapbox-maps-swiftui-demo/issues/3#issuecomment-600902173