I'm interested in creating bezier curves on a path based on imported GPX data and understand how to implement turf.js for web. But how would I implement this for iOS? Specifically, if I am using a Mapbox hosted map in iOS, how do I apply the turf.js to enable that, or is there an alternative way of getting an OSM Mapbox or Leaflet map into iOS (and, importantly, for offline caching)?

1 Answer 1


I am not very familiar with iOS development, or the specifics of your implementation, but the bezier curve algorithm is actually pretty straightforward and well documented. If there is not already an iOS lib around, you could implement basic linear interpolation in a one liner:

Wikipedia Source

  • 1
    Thanks Morgan, I'll try to find an iOS lib that might work for this, but I missed that math class on linear interpolations so I'm not confident in building that myself :-) BTW, turf is great, thanks so much for creating that! Mar 19, 2015 at 18:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.