Click or drag to resize

Telogis.GeoBase.MapLayers.TrafficLayer

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release

MapLayers.TrafficLayer inherits from MapLayers.TileLayer.

Creates a layer that is responsible for displaying traffic tiles from the tile server.

Constructor
NameDescription
MapLayers.TrafficLayer(config)

Arguments

  • config (Object) - Configuration options for the MapLayers.TrafficLayer.

    Properties
    NameTypeDescription
    refreshTimeNumber

    The time in seconds between reloading real-time traffic data. If the value is null, then the refresh time returned by the server is used.

    Defaults to null.
    sourceString

    The traffic source to fetch data from. This corresponds to the ID attribute of the Traffic element in traffic.config on the server.

    Defaults to "default".
    timeDate

    The time to retrieve traffic for. If MapLayers.TrafficLayer.REAL_TIME is specified, traffic tiles will be updated as new data becomes available.

    Defaults to MapLayers.TrafficLayer.REAL_TIME.
Functions
NameDescription
_dateToISOString (Date date)

Converts a JavaScript Date object to a string of the format "YYYY/MM/DDTHH:MM:SSZ" in Coordinated Universal Time (UTC).

Arguments
  • date (Date or String) - The Date to convert to a string.

_trafficRefreshHook (Function getTiles, Object server)

Proxies update calls to include updated traffic information.

Arguments
  • getTiles (Function) - The wrapped update function.

  • server (Object) - An optional object that contains server.url and server.authToken to be used for this request

reconfigureTraffic (Object config)

Applies new traffic configuration settings.

Arguments
  • config (Object) - The object containing the updated configuration properties.