Bridge GeoPoint to CLLocationCoordinate2D #9958
michaelscampbell
started this conversation in
Ideas
Replies: 1 comment
-
Thanks for starting the discussion. I'm going to transfer this to a feature request for better visibility and tracking |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I notice that the Firebase libraries bridge some types from Firebase to Swift. For example, Timestamp to Date. It would be helpful to me for Firebase to bridge GeoPoint to CLLocationCoordinate2D also.
In particular, when converting a Firebase document to a custom object using
documentReference.document.data(as: type.self)
I would like to be able to convert a Firebase GeoPoint field directly to a CLLocationCoordinate2D as part of the conversion process.Today I have to store a GeoPoint in my model. I then have a computed variable of type CLLocationCoordinate2D based on that GeoPoint. The rest of my app references the CLLocationCoordinate2D. So this conversion would allow me to simplify my model in multiple places (each object that references a GeoPoint).
Both types store a latitude and longitude so the conversion between them might be straight forward.
Beta Was this translation helpful? Give feedback.
All reactions