So I've been experimenting with creating custom maps using the Google Maps API. I've been successful in creating static maps with an encoded polyline.
Unfortunately, Google Maps has a watermark in its static maps which I don't want. It seems that Mapbox doesn't have this watermark and so I'm trying to create a map with a polyline.
From looking at the API docs, it doesn't look like they support creating a map with a polyline and instead want co-ordinates. I've now got an array of data that looks like this:
MapBox wants the data in this format:
Is there a way of converting the data I've put above into an acceptable format? I don't have any array keys etc to play with.
Alternatively, if someone knows how to create a Mapbox map with a polyline then that would be very helpful!