Maps API for JavaScript

China specific
Maps API for JavaScript Developer's Guide

H.service.TrafficIncidentsService

Class Summary

Extends: H.service.AbstractRestService

TrafficIncindentsService provides functionality to the low level traffic incidents api Traffic API documentation where it is possible to retrieve traffic incident information on a tile basis

[ For full details, see the Class Details ]

Method Summary

Table 1. Methods
Methods

requestIncidents (serviceParams, onResult, onError) : {H.service.JsonpRequestHandle}

This method requests traffic incidents based on the service parameters provided.

requestIncidentsByTile (x, y, z, onResult, onError, opt_serviceParams) : {H.service.JsonpRequestHandle}

This method requests traffic incident information by tile coordinates

Class Description

TrafficIncindentsService provides functionality to the low level traffic incidents api Traffic API documentation where it is possible to retrieve traffic incident information on a tile basis

Constructor Details

H.service.TrafficIncidentsService(opt_options)

Parameters:
 
opt_options:
{H.service.TrafficIncidentsService.Options=} [optional]
 

Method Details

requestIncidents (serviceParams, onResult, onError) : {H.service.JsonpRequestHandle}

This method requests traffic incidents based on the service parameters provided.

Parameters:
 
serviceParams:
{H.service.ServiceParameters}
 
onResult:
{function(H.service.ServiceResult)}
 
onError:
{function(Error)}
 

requestIncidentsByTile (x, y, z, onResult, onError, opt_serviceParams) : {H.service.JsonpRequestHandle}

This method requests traffic incident information by tile coordinates

Parameters:
 
x:
{number}
 
tile column number
y:
{number}
 
tile row number
z:
{number}
 
zoom level
onResult:
{function(H.service.ServiceResult)}
 
callback to handle service response
onError:
{function(Error)}
 
callback to handle communication error
opt_serviceParams:
{H.service.ServiceParameters=} [optional]
 
optional service parameters to be added to the request