getTrafficStatus: Get Traffic Status from amap

Description Usage Arguments Value Examples

Description

get traffic status from amap,there are c(description,expedite,congested,blocked,unkown)

Usage

1
2
3
getTrafficStatus(type = "rectangle", location = NULL, name = NULL,
  radius = NULL, city = NULL, citycode = "350100", key = amap_key,
  output = "XML")

Arguments

type

character:defalut NULL ,should be rectangle/circle/NULL

location

character:location should be writtend like

name

should be 'json' or 'xml', the type of the result

radius

logical value, return the coordinates or the original results

city

character

citycode

code of city.for examples fuzhou is 0591

key

amap key

output

xml or json

Value

A vector contains description,expedite,congested,blocked,unkown

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
## rectangle
location='119.278861,26.106208;119.336454,26.078304'
# the rectangle can't be too big,diagonal must be shorted than 10km
a=getTrafficStatus(location = location,key = amap_key,type='rectangle')

## circle
location='119.278861,26.106208'
b=getTrafficStatus(type='circle',location = location,key = amap_key)

## road
location='119.278861,26.106208'
c=getTrafficStatus(type='name',key = amap_key,name='鍙ょ敯璺愼㹦')

## End(Not run)

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