You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I stumbled across this looking for a map overlay for MapKit to show daylight/night over map of the world. I am glad to see a solid foundation in this project.
Here's an enhancement I'd like to see:
Given a longitude and latitude, at the current time, is that location in daylight or darkness.
[User could choose what they consider daylight from the SolarEvent enum. It would be great if we did not have to worry about time zone and just a location on earth at the current time.]
So maybe something like:
let currentLocation = CLLocationCoordinate2D(latitude: 40.642, longitude: -74.017)
let inDaylight: Bool = currentLocation.inDaylight(usingDawn: .civilDawn, andDusk: .civilDusk)
I'll be playing around with what you have. Beats starting from NASA's codeI've seen since this is already migrated to Swift.
The text was updated successfully, but these errors were encountered:
I stumbled across this looking for a map overlay for MapKit to show daylight/night over map of the world. I am glad to see a solid foundation in this project.
Here's an enhancement I'd like to see:
Given a longitude and latitude, at the current time, is that location in daylight or darkness.
[User could choose what they consider daylight from the SolarEvent enum. It would be great if we did not have to worry about time zone and just a location on earth at the current time.]
So maybe something like:
I'll be playing around with what you have. Beats starting from NASA's codeI've seen since this is already migrated to Swift.
The text was updated successfully, but these errors were encountered: