'sf'-Compatible Interface to 'Google Maps' APIs

Interface to the 'Google Maps' APIs: (1) routing directions based on the 'Directions' API, returned as 'sf' objects, either as single feature per alternative route, or a single feature per segment per alternative route; (2) travel distance or time matrices based on the 'Distance Matrix' API; (3) geocoded locations based on the 'Geocode' API, returned as 'sf' objects, either points or bounds.


News

mapsapi 0.1.0 (2017-09-27)

  • Added 'Directions' API interface
  • Added 'Distance Matrix' API interface

mapsapi 0.2.0 (2017-11-02)

  • Added 'Geocode' API interface
  • Added input checks
  • Added arrival & departure time parameters

mapsapi 0.3.0 (2018-01-11)

  • Added delay in 'mp_geocode' to avoid rate limit
  • Fixed index issue in 'mp_geocode'
  • Fixed 'mp_get_points' issue with multiple points

mapsapi 0.3.5 (2018-03-12)

  • Added 'bounds' parameter for 'mp_geocode'
  • Added argument validation in 'mp_geocode'
  • Corrected typo when creating geometry column in 'mp_get_routes' and 'mp_get_segments'

mapsapi 0.3.7 (2018-07-23)

  • Minor updates in documentation
  • Added 'duration_in_traffic' option in 'mp_get_matrix'
  • 'mp_matrix' now returns 'NA' when there are zero results

mapsapi 0.3.9

  • Support for "waypoints" parameter in 'mp_directions' and 'ms_get_segments'
  • 'mp_routes' now returns empty LINESTRING when 'doc' contains no route alternatives ('ZERO_RESULTS')
  • Added 'quiet' parameter to 'mp_directions' and 'mp_matrix' to hide API from text key when necessary

To add

  • Add 'address type' (geocode accuracy) field for 'mp_get_points'
  • Get static map images (?)

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("mapsapi")

0.4.0 by Michael Dorman, 2 months ago


https://github.com/michaeldorman/mapsapi/


Report a bug at https://github.com/michaeldorman/mapsapi/issues/


Browse source code at https://github.com/cran/mapsapi


Authors: Michael Dorman [aut, cre] , Tom Buckley [ctb] , Alex Dannenberg [ctb]


Documentation:   PDF Manual  


Task views: Web Technologies and Services


MIT + file LICENSE license


Imports magrittr, xml2, sf, bitops, plyr

Suggests knitr, rmarkdown, leaflet


See at CRAN