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
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:
-
1Thanks 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! Commented Mar 19, 2015 at 18:27