CLLocationCoordinate2D conformance to Codable should be private
1ec5 opened this issue · 0 comments
1ec5 commented
Turf publicly declares CLLocationCoordinate2D’s conformance to Codable and implements the protocol according to the GeoJSON standard, as an array in longitude, latitude order. But this is problematic if the application or some other library needs to support some other coordinate representation in JSON. For example, Overpass JSON represents coordinate pairs as objects. Turf needs this Codable implementation but doesn’t need to export it publicly. It would be trivial for client code to reimplement this conformance if necessary.
turf-swift/Sources/Turf/CoreLocation.swift
Lines 53 to 66 in 1a105b1
/cc @mapbox/navigation-ios @frederoni