Learn R Programming

ubeR (version 0.1.4)

route_map: Create a route map for a trip

Description

A map, centered at the mean of the start and end locations, is accessed via get_map and a suitable driving route between these points is constructed using google_directions then added to the map.

Usage

route_map(start_latitude = NULL, start_longitude = NULL,
  end_latitude = NULL, end_longitude = NULL, start_address = NULL,
  end_address = NULL, key = "", zoom = 14)

Arguments

start_latitude
Initial latitude.
start_longitude
Initial longitude.
end_latitude
Final latitude.
end_longitude
Final longitude.
start_address
Initial address.
end_address
Final address.
key
Google Maps API key (optional).
zoom
Map zoom, an integer from 3 (continent) to 21 (building).

Value

A ggplot2 graphics object.

Examples

Run this code
## Not run: ------------------------------------
# route_map(start_address = "37 Beach Road, Mouille Point, Cape Town",
#           end_address = "100 St Georges Mall, Cape Town City Centre, Cape Town")
## ---------------------------------------------

Run the code above in your browser using DataLab