getRoute: Get route from query Take in a original location and...

Description Usage Arguments Details Value Examples

View source: R/getRoute.R

Description

Get route from query Take in a original location and destination, return the direction

Usage

1
2
getRoute(origin, destination, mode = "driving", city = NULL,
  strategy = 9, size = 2, output = "xml", map_ak = "")

Arguments

origin

the original location

destination

the destination

mode

'driving'(default), 'walking', or 'transit','bicycling','truck'.

city

the city of of original location and destination.

strategy

integer from 0 to 20 for path selecting, default 9 for driving mode.

size

for truck mode.

Details

Go to https://lbs.amap.com/api/webservice/guide/api/direction to read more.

Value

a data frame contains longtitude and latitude of the route.

Examples

1
2
3
4
5
6
## Not run: 
bjMap = getBaiduMap('鍖椾含', color='bw')
df = getRoute('棣栭兘鍥介檯鏈哄満', '鍖椾含鍗楄嫅鏈哄満', region = '鍖椾含')
ggmap(bjMap) + geom_path(data = df, aes(lon, lat), alpha = 0.5, col = 'red')

## End(Not run)

icejean/gaodemap documentation built on Nov. 4, 2019, 1:53 p.m.