Homework 4 (due 21.10.2018)
Develop an Android application using Google Maps API
- You need to draw the path on the map from a static location (e.g. J. Liivi 2, your residence, ..) to your current location.
- You should mark the locations using a red marker (1pt)
- Get the current location using GPS. (1.5pts)
- Draw the best path (dynamically, using Google Maps API) between two locations (2.5pts)
Update (16.10)
As some of you have noticed, using the Google Directions API for obtaining route waypoints has 1 big problem - for free, Google only allows 1 request per day for a given API key. Due to this we introduced an alternative option for the homework. You have two options:
- Proceed to use Google Directions API, with the 1 req. / day limit, and try to complete the homework. As a workaround, you can get more than 1 request by creating additional projects and API keys for the projects.
- Use a different API for the route waypoints, namely the HERE location suites (https://developer.here.com/). HERE doesn't have limits as aggressive as Google, and the web JSON API works quite similar to Google's Directions API. If you choose to use HERE, please still use Google's Map for drawing the map, points & lines, but use HERE to get the coordinates of route waypoints.
Note: It's possible that the coordinates of HERE and Google Maps don't 100% align so depending on your location, this approach may behave unexpectedly, but from our initial testing, overlaying HERE-based coordinates on Google Maps seemed to do the job.
(Another tip: you could use a tool like Mocky, https://www.mocky.io/ . Using it you can quickly define a static web response that is identical to the response Google's API returns, might be helpful for testing your application)