implement transportation routes in mapView

Hi,


I need to implement a train route in map view. The information on trains is fetched from API(JSON). I followed the tutorial from "Intro to app development with swift" book about fetching the photo and text description from NASA's API. I was successful with that tutorial. Since we have coordinates from the JSON files, I was not able to create the structure and map it and overlay on the MapView.


Has anyone worked with transportation API with maps? Or is there any easy solution. Any help would be appreciated.