Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

add support for geodesic polylines (and thus great circles) #1726

Closed
incanus opened this issue Jun 15, 2015 · 10 comments
Closed

add support for geodesic polylines (and thus great circles) #1726

incanus opened this issue Jun 15, 2015 · 10 comments
Labels
archived Archived because of inactivity Core The cross-platform C++ core, aka mbgl feature Google Maps parity For feature parity with the Google Maps SDK for Android or iOS MapKit parity For feature parity with MapKit on iOS or macOS rendering

Comments

@incanus
Copy link
Contributor

incanus commented Jun 15, 2015

We did this before in our raster SDK here:

https://github.com/mapbox/mapbox-ios-sdk/blob/edbe9905299ddbf8b32e41d8978b7b3265eef8f8/MapView/Map/RMGreatCircleAnnotation.m

Demo: https://vimeo.com/73482728

This uses a ~100 segment polyline to approximate a curved one and looks good. But we probably want to do this at the C++ level and wrap it in client APIs?

Relatively low priority.

@tmcw
Copy link
Contributor

tmcw commented Feb 19, 2016

@bleege @1ec5 are there built-in great circle line constructors in MapKit or Google Maps? If not, would it be okay to implement this outside of core?

@tmcw tmcw self-assigned this Feb 19, 2016
@1ec5
Copy link
Contributor

1ec5 commented Feb 19, 2016

MapKit supports circles; we're tracking an equivalent in #2167. But no, I think support for geodesic polylines on iOS is limited to the legacy Mapbox iOS SDK and possibly some niche libraries.

We don't have an answer for implementing anything "outside of core" at the moment. There's no plugin system, but one could be fashioned out of CocoaPods subspecs. (There's no equivalent concept for Carthage, Fabric, or manual installation.)

@tmcw
Copy link
Contributor

tmcw commented Feb 19, 2016

I'll implement this in Swift as a learning exercise.

@bleege
Copy link
Contributor

bleege commented Feb 19, 2016

@tmcw Nope on Android either. That said, I think there's some confusion about "outside of core" means here. We'd likely want to bake the math part into Core GL (aka C++ level that @incanus talked about above) and then have iOS and Android bindings in the regular SDKs and not standalone libraries that would be distributed via CocoaPods or Maven Central. Make sense?

@1ec5
Copy link
Contributor

1ec5 commented Mar 2, 2016

But no, I think support for geodesic polylines on iOS is limited to the legacy Mapbox iOS SDK and possibly some niche libraries.

Correction: MapKit supports geodesic polylines with the MKGeodesicPolyline class. There are some examples at NSHipster.

@1ec5
Copy link
Contributor

1ec5 commented May 28, 2016

@jfirebaugh, would geometry.hpp need to support geodesic polylines as a separate geometry type, or could it be treated as a special case of a line string?

@1ec5 1ec5 added the MapKit parity For feature parity with MapKit on iOS or macOS label Aug 22, 2016
@1ec5 1ec5 added the Google Maps parity For feature parity with the Google Maps SDK for Android or iOS label Apr 20, 2017
@kkaefer kkaefer added Core The cross-platform C++ core, aka mbgl rendering labels May 30, 2017
@kkaefer
Copy link
Member

kkaefer commented May 30, 2017

See #6861 / #6940 for a potential alternative.

@captainbarbosa
Copy link
Contributor

Is this something that we would still consider implementing?

@mikaelhellqvist
Copy link

@captainbarbosa I've just pushed a calculation of great circles to GitHub. Feel free to use that: https://github.com/mikaelhellqvist/GreatCircle/tree/master

@stale stale bot added the archived Archived because of inactivity label Nov 3, 2018
@stale
Copy link

stale bot commented Dec 3, 2018

This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived Archived because of inactivity Core The cross-platform C++ core, aka mbgl feature Google Maps parity For feature parity with the Google Maps SDK for Android or iOS MapKit parity For feature parity with MapKit on iOS or macOS rendering
Projects
None yet
Development

No branches or pull requests

7 participants