Closed ccarse closed 2 years ago
I'm open to wrapping coordinates if that is the right approach for leaflet. /cc @mourner for any thoughts. Currently arc.js by default splits lines that cross the dateline - I presume that wrapping would be an alternative solution?
For use in Leaflet, maybe we could just generate continuous coordinates (including off-range) instead of splitting lines in case either source or destination point is off-range (<-180 or >180)?
Thanks @mourner! Sounds like an easier solution and worthwhile. I'll keep the splitting code around for applications like TileMill, but Leaflet is and was the main target of arc.js, so this sounds like a better approach.
Splitting may be useful in Leaflet too, I'm just suggesting an approach that implicitly picks one of the two ways depending on input data, without having to pass an option.
an implementation of the suggestion in https://github.com/springmeyer/arc.js/issues/13#issuecomment-44318714 would still be welcome, but i'm closing in the name of housekeeping.
On https://www.mapbox.com/mapbox.js/example/v1.0.0/cross-date-line/ you'll notice the comment:
It would be nice if arc.js could generate lines with coordinates like that. If this is something you'd accept in a pull request let me know, I could possibly take a look at it but I can make no promises, my js is very weak.
Thanks, Cody