-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚚 Break up targets to fix unnecessary dependencies
- Loading branch information
1 parent
87c2c87
commit 19164e5
Showing
35 changed files
with
247 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// | ||
// Exports.swift | ||
// SwiftGeo | ||
// | ||
// Created by Rémi Bardon on 22/11/2022. | ||
// Copyright © 2022 Rémi Bardon. All rights reserved. | ||
// | ||
|
||
@_exported import TurfCore | ||
@_exported import TurfMapKit |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,5 @@ | |
// | ||
|
||
@_exported import WGS84Core | ||
@_exported import WGS84Geometry | ||
@_exported import WGS84Turf |
This file was deleted.
Oops, something went wrong.
40 changes: 40 additions & 0 deletions
40
Sources/WGS84Core/Interoperability/WSG84Core+CoreLocation.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// | ||
// WSG84Core+CoreLocation.swift | ||
// SwiftGeo | ||
// | ||
// Created by Rémi Bardon on 02/02/2022. | ||
// Copyright © 2022 Rémi Bardon. All rights reserved. | ||
// | ||
|
||
#if canImport(CoreLocation) | ||
import CoreLocation | ||
|
||
extension Coordinate2D { | ||
|
||
public var clLocation: CLLocation { | ||
CLLocation( | ||
latitude: self.latitude.decimalDegrees, | ||
longitude: self.longitude.decimalDegrees | ||
) | ||
} | ||
|
||
public var clLocationCoordinate2D: CLLocationCoordinate2D { | ||
CLLocationCoordinate2D( | ||
latitude: self.latitude.decimalDegrees, | ||
longitude: self.longitude.decimalDegrees | ||
) | ||
} | ||
|
||
public init(_ location: CLLocation) { | ||
self.init(location.coordinate) | ||
} | ||
|
||
public init(_ coordinate: CLLocationCoordinate2D) { | ||
self.init( | ||
latitude: .init(decimalDegrees: coordinate.latitude), | ||
longitude: .init(decimalDegrees: coordinate.longitude) | ||
) | ||
} | ||
|
||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// WSG84Core+MapKit.swift | ||
// SwiftGeo | ||
// | ||
// Created by Rémi Bardon on 02/02/2022. | ||
// Copyright © 2022 Rémi Bardon. All rights reserved. | ||
// | ||
|
||
// `MapKit` depends on `CoreLocation`, no need to check | ||
#if canImport(MapKit) | ||
import MapKit | ||
|
||
public extension Coordinate2D { | ||
|
||
var mkMapPoint: MKMapPoint { | ||
MKMapPoint(self.clLocationCoordinate2D) | ||
} | ||
|
||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// | ||
// Exports.swift | ||
// SwiftGeo | ||
// | ||
// Created by Rémi Bardon on 27/11/2022. | ||
// Copyright © 2022 Rémi Bardon. All rights reserved. | ||
// | ||
|
||
@_exported import WGS84Core |
31 changes: 31 additions & 0 deletions
31
Sources/WGS84Geometry/Interoperability/WGS84Geometry+CoreLocation.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// | ||
// WGS84Geometry+CoreLocation.swift | ||
// SwiftGeo | ||
// | ||
// Created by Rémi Bardon on 02/02/2022. | ||
// Copyright © 2022 Rémi Bardon. All rights reserved. | ||
// | ||
|
||
#if canImport(CoreLocation) | ||
import CoreLocation | ||
|
||
public extension Point2D { | ||
|
||
var clLocation: CLLocation { | ||
self.coordinates.clLocation | ||
} | ||
|
||
var clLocationCoordinate2D: CLLocationCoordinate2D { | ||
self.coordinates.clLocationCoordinate2D | ||
} | ||
|
||
init(_ location: CLLocation) { | ||
self.init(coordinates: .init(location)) | ||
} | ||
|
||
init(_ coordinate: CLLocationCoordinate2D) { | ||
self.init(coordinates: .init(coordinate)) | ||
} | ||
|
||
} | ||
#endif |
Oops, something went wrong.