Maps API for JavaScript

China specific
Maps API for JavaScript Developer's Guide

H.service.TrafficIncidentsService

Class Summary

Extends: H.service.AbstractRestService

This class encapsulates the Traffic API in a service stub, providing methods to access its resources.

[ 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

This class encapsulates the Traffic API in a service stub, providing methods to access its resources.

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