Moving markers like UBER on google maps in a swift application.
The locations information is stored in dataHeading.csv file.
- Use the Podfile to install project dependencies.
- Generate a new api key for the Google Maps API. Add apiKey in the sample_config.plist.
- Replace path is app delegate to point to the sample_config.plist.
- Generate a dataHeading.csv file by following this procedure:
- Add the route you want to generate data for on a new map which can be created on the https://mymaps.google.com portal.
- Export a route layer using to a kml file.
- Upload the generated route kml file to http://www.gpsvisualizer.com/convert_input.
- Set the output file format to plain text and set the "plain text delimiter" option to comma and leave all the remaining options to default to generate the required comma separated file.
I refereed http://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ for understanding heading calculating. For some developers (including myself), following a bunch of formulas on a blog might get very confusing. So I created a simple excel sheet for understanding the calculation before you move on to understand the code implementation.
लोकाः समस्ताः सुखिनोभवंतु