Convert array of coords to TTCoordinatesData

Hi, I’m trying to pass points (coordinates) from javascript to iOS as an array (trying to implement it to react native).
Can I convert array of coordinates to TTCoordinatesData?

Thanks

In which language you would need this?
Can you also provide some example input values?

1 Like

Using javascript,
I called this api https://api.tomtom.com/routing/1/calculateRoute/ then I stored the response json.routes[0].legs[0].points as an array.
From swift I bridged tomtom map view and added a property for the stored points.
I want to use the stored point in the coordinates data.

TTMapRoute(coordinatesData:storedPoints
with: TTMapRouteStyle.defaultActive(),
imageStart: TTMapRoute.defaultImageDeparture(),
imageEnd: TTMapRoute.defaultImageDestination())

is there a way to convert this array to TTCoordinatesData in swift?