getRoute: Get route from query

Description Usage Arguments Value Examples

Description

Take in a original location and destination, return the direction

Usage

1

Arguments

origin

the original location

destination

the destination

mode

'driving'(default), 'walking', or 'transit'

region

the city of of original location and destination. If original and destination is not in the same city, set 'origin_region' and 'destination_region' seperately.

origin_region

the city of original location. If not set, use 'region' instead.

destination_region

the city of destination. If not set, use 'region' instead.

tactics

10(no expressway), 11(default, shortest time), 12(shortest path).

coord_type

'bd09ll'(default), 'gcj02'(which Google map and Soso map are using), 'wgs84' for GPS devices.

Value

a data frame contains longtitude and latitude of the route.

Examples

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

## End(Not run)

daigazi/bamapr documentation built on May 14, 2019, 3:28 p.m.