The project is an example to populate google map with placemarks, waypoints and draw polyline joining the waypoints. The placemark info like latitude, longitude, address etc are hosted on a gist file on github.
In order to integrate the google api services like maps, directions etc. you need to have a google account and enable the api services on google console.
-
Go to Google Console and sign in/ sign up.
-
Create a project
-
Select the project created and got to Dashboard -> Enable APIS AND services
-
Enable services named Google Maps Directions API, Google Maps SDK for iOS and Google Maps Embed API.
-
Create an API key from the Credentials section in the left menu.
-
Make sure you add restrictions to your api key to be used through your iOS app only.
-
Moya for network api calls.
-
Make sure cocopods is installed on your mac.Follow link Cocoapods if not installed.
-
Go to the project directory in Terminal and run command pod update. This step is optional to get the latest google and Moya networking library versions.
-
Open the file Locations.xcworkspace in Locations folder using Xcode.
-
Run the project in Xcode.̨
-
Add the API-KEY you got from google console to kGMapsAPIKey in constants.swift file.
Any suggestions are welcome, if you like the project don't forget to add a star on this repo :-)