{"repo":"sgade/swiftui-mapview","free":true,"listed":false,"github":"https://github.com/sgade/swiftui-mapview","clone":"git clone https://github.com/sgade/swiftui-mapview.git","description":"MKMapView in SwiftUI","language":"Swift","stars":145,"topics":["swiftui","mkmapview","swift"],"license":"MIT","category":"mobile-apps","readme_excerpt":"swiftui-mapview MKMapView in SwiftUI. For iOS 17 and later, I recommend you use Apple's official Map view. (Click the image to see the full screenshot) Install Using Xcode, select File - Swift Packages - Add Package Dependency and enter https://github.com/sgade/swiftui-mapview . Usage In your view, add the map. See the example project for how to integrate the map view. Configuration Map type User location Showing the current user location The current location can be shown on the map. Note that the application requires permission to access the current user location. See the documentation on MapView.showsUserLocation for more information. Tracking the user's location Setting the visible region The binding passed in for region defines the visible map region. Use it to define the visible center and zoom. Setting it to nil will use the map's default region when loaded. It is also updated when the visible region changes. Annotations Adding annotations Annotations are represented as objects of a custom class that implements the MapViewAnnotation protocol. It might be helpful to subclass from existing classes like MKPlacemark . Selecting annotations A list of selected annotations can be passed in via a binding. Contributing See the contributing guide. License This project is licensed unter the terms of the MIT license. See LICENSE for more information.","default_branch":null,"files":null,"tree":[],"storefront":"/r/sgade","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/sgade/swiftui-mapview/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}