Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Cannot find type 'LocationCoordinate2D' in scope" #73

Closed
Av3r3tt opened this issue Mar 19, 2021 · 1 comment
Closed

"Cannot find type 'LocationCoordinate2D' in scope" #73

Av3r3tt opened this issue Mar 19, 2021 · 1 comment
Labels

Comments

@Av3r3tt
Copy link

Av3r3tt commented Mar 19, 2021

Just tried to manually drag Polyline.swift into my project and I get a list of errors based in the fact that

Cannot find type 'LocationCoordinate2D' in scope

Are LocationCoordinate2D the same as CLLocationCoordinate2D? Is it just defined as an alias outside Polyline.swift?

Thanks for any help.

@1ec5
Copy link
Collaborator

1ec5 commented Mar 20, 2021

As of #55, this project uses LocationCoordinate2D instead of CLLocationCoordinate2D so that it compiles on Linux, which doesn’t have Core Location. On Apple platforms, which have Core Location, LocationCoordinate2D is indeed just a type alias for CLLocationCoordinate2D. The definition is located in a separate file:

public typealias LocationCoordinate2D = CLLocationCoordinate2D

This project may not be limited to these two files in the future, so consider using a dependency manager such as Swift Package Manager (built into Xcode) to pull in Polyline more reliably.

@1ec5 1ec5 added the question label Mar 20, 2021
@1ec5 1ec5 closed this as completed Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants