English 中文(简体)
how to limit zoom level in map swift ui?
原标题:
  • 时间:2023-05-25 02:58:09
  •  标签:
  • swift

how to limit zoom level in map swift ui i have map and need to make zoom level limited

  Map(coordinateRegion: $region,annotationItems: viewModel.nearbyGyms) { item in
                    MapAnnotation(coordinate: CLLocationCoordinate2D.init(latitude: item.geometry?.location?.lat ?? 0.0, longitude: item.geometry?.location?.lng ?? 0.0)) {
                        NavigationLink(destination:Text("Details")) {
                            VStack {
                                if item.photos?.first?.photoReference != nil {
                                    ImageView(photoReference: item.photos?.first?.photoReference)
                                } else {
                                    ImageView(photoReference: item.photos?.last?.photoReference)
                                }
                                Text(item.name ?? "unknown")
                                    .lineLimit(1)
                                    .scaleEffect(0.8)
                            }
                        }
                    }
                }
问题回答

暂无回答




相关问题
SwiftUI: How do I position a button x points above a sheet?

I am trying to recreate a Maps-style UI with a persistent bottom sheet and controls fixed above. Apple Maps UI with controls above ☝️ Example here, the "Look Around" binoculars button and ...

BraintreeDropIn deprecated functions error

I m getting this error on the latest release of BraintreeDropIn, I really don t get it since based on the patch notes, this should ve been addressed already, I have already tried cleaning derived data,...

how to limit zoom level in map swift ui?

how to limit zoom level in map swift ui i have map and need to make zoom level limited Map(coordinateRegion: $region,annotationItems: viewModel.nearbyGyms) { item in ...

UIImageView - How to get the file name of the image assigned?

Is it possible to read the name of an UIImageView s UIImage that s presently stored in the UIImageView? I was hoping you could do something kind of like this, but haven t figured it out. NSString *...

热门标签