Location:

Traffic Event Broadcast

Incident Class

Describe the road section of the road event (construction/sealing).

ConstructorDescription

nimap.service.Incident(IncidentOptions)

 

IncidentOptionsTypeDescription

city

String

Required, search for the city (name/adcode) ), example "Beijing" or "110000"

pageSize

Integer

The number of returns per page. The default is 10, and the range is 1-15.

frontRadius

Number

Distance used for front road event search, in meters. Default 3000 meters

aroundRadius

Number

The radius used for the surrounding road event search, in meters. Default 3000 meters

 

MethodReturn ValueDescription

searchAroundIncident(lonlats|poiName,function(result)) or searchAroundIncident(lonlats|poiName,options=<Object>,function(result))

Road event search within a certain range nearby. It can pass latitude and longitude and also supports location name search. Example: searchAroundIncident(lonlats,options=<Object>,function(result)),options={num:5,aroundRadius:3000};num :Default 5, sort by event type,Value range 1-20.aroundRadius: Default 3000,Value range 1-1000.

searchFrontIncident(lonlats,function(result)) or searchFrontIncident(lonlats,options=<Object>,function(result))

Search for road conditions for road events in the 45° sector. Lollats = latitude and longitude coordinate string (coordinate string to; segmentation, for example: "116.2305, 40.07837; 116.23058, 40.07822"), supports up to 5 coordinate points, and determines the direction according to the latitude and longitude string. If only one latitude and longitude is entered, the direction is determined according to the parameter dir. Example: searchFrontRTIC(lonlats, options=<Object>, function(result)), options={num:5,aroundRadius:3000}; num :Default 5, sort by event type,Value range 1-20.aroundRadius: Default 3000,Value range 1-1000.

searchNaviIncident(lonlats,function(result))

Search for events on the way to the navigation line. Lollats is the navigation line coordinates, for example: "116.2305, 40.07837; 116.23058, 40.07822...", or [[116.2305,40.07837],[116.2305,40.07837]....]

searchRoadIncident(roadName,function(result))

Perform an event search based on the road name. Example: "Beiqing Road"

setCity()

Set search city

setPageSize()

Set the number of returns per page

setFrontRadius()

Set the distance to search forward

setAroundRadius( )

Set the radius of the surrounding search

TOP