Map
SunKit
Map | SunKit | |
---|---|---|
5 | 7 | |
175 | 118 | |
- | 2.5% | |
1.6 | 6.1 | |
7 months ago | about 2 months ago | |
Swift | Swift | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Map
-
Publishing changes from within view updates is not allowed, this will cause undefined behavior. on Map with Annotations
Something similar to this which can help w performance a lot especially if you use clusters
-
Map clustering for new Map()
Eventually they will have to add it but i wouldnt hold my breath. You can still use swiftui views in uikit annotations and wrap mkmapview to look like swiftui similar to this
-
Any good tutorials on how to get directions in a map for swiftui?
To get directions, have a look at the official MapKit documentation for MKDirections. In each route of MKDirection.Response, you can find an overlay of type MKOverlay that you can use on MKMapView. Apples own Map implementation for SwiftUI is actually pretty limited, so you can either wrap MKMapView yourself or use the library that I built: https://github.com/pauljohanneskraft/Map
-
MKMapView wrapper for SwiftUI
You can find a first approach in this pull request I opened. It allows you to effectively call setNeedsDisplay on the MKOverlayRenderer in use by use of Combine publishers and gives you custom access to the draw and canDraw methods of MKOverlayRenderer directly - would love this to be a SwiftUI view instead, but I'm not sure how to draw into a cgcontext directly - maybe with a UIHostingController and then draw its view into the cgcontext? but then again, how would you map the SwiftUI view to individual MKMapPoints? not sure, if this would ever be a simple task.
I was quite frustrated with the limited functionality of MapKit's MKMapView SwiftUI wrapper - so I built my own with a lot more features and customization options and made it open source on GitHub.
SunKit
What are some alternatives?
SwiftUI-Kit - A SwiftUI system components and interactions demo app
SunCalc - A Swift package for calculation of Sun and Moon positions and phases.
InteractiveMap - An Interactive Map Library for Swift and SwiftUI!
rust-sun - A Rust library for calculating sun positions
TCCMapTileAnimation - iOS Project to display animated map tiles within MapKit
ExtensionKit - Helpful extensions for iOS app development 🚀
PreviewDevice - PreviewDevice - is a library with type-safe syntax sugar for preview device on SwiftUI. Preview for UIKit and Cocoa.
astral - ☀️ Go calculations for the position of the sun and moon.
GaugeKit - GaugeKit is a free-to-use, open source Swift Package. It allows for easy creation of gauges not unlike the circular graphics used in many complications on the Apple Watch. ⌚️
MoonKit - MoonKit is a Swift library which uses math and trigonometry to compute several information about the Moon.
SwiftCurrent - A library for managing complex workflows in Swift
SwiftTheming - A powerful lightweight theme 🎨 manager for SwiftUI