/arduino-google-maps-api

An Arduino library for communicating with the Google Maps Api

Primary LanguageC++GNU General Public License v2.0GPL-2.0

arduino-google-maps-api

A wrapper for the Google Maps API for Arduino (works on ESP8266). Available on the Arduino library manager.

There are now two different parts of the API implemented and they can be used separately (They are independent of each other)

Directions API

Link to Directions API documentation

This is probably the better of the two APIs (which have similar functions)

Main Features:

  • Supports travel times (including traffic) between two locations
  • Also supports waypoints (which basically travel time between A->B via C)
  • Supports more optional inputs (avoid, units)
  • Returns a struct object with the more useful info from the response
  • Maybe slightly slower than DistanceMatrix as the response is very large (although the library minimises this, by only parsing the useful info)

Example

Example here

Note: that only one of the headers of this library is used: GoogleMapsDirectionsApi.h

Required Libraries

The Directions part of the library requires Squix78's Json Streamer Parser, which can be installed via the arduino library manager.

Getting a Google API key (Required!)

Distance Matrix API

Link to Distance Matrix API documentation

This is the API that was implemented in the first version of the library.

Main Features:

  • Supports travel times (including traffic) between two locations
  • Returns the full response from Google as a String in JSON format
  • Maybe slightly faster than Directions as the response is much smaller

Example

Example here

Note: that only one of the headers of this library is used: GoogleMapsApi.h

Required Libraries

The Distance Matrix part of the library requires Benoît Blanchon's ArduinoJson library, which can be installed via the arduino library manager.

Getting a Google API key (Required!)