route_map: Create a route map for a trip

Description Usage Arguments Value Examples

View source: R/map.R

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

1
2
3
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

1
2
3
4
5
## 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")

## End(Not run)

ubeR documentation built on May 30, 2017, 1:41 a.m.