API Docs for: 7.2
Show:

MQA.Traffic Class

Extends MQA.Base
Module: MQA

Creates a traffic object which encapsulates all the traffic functionality.

Constructor

MQA.Traffic

(
  • map
  • outputPng
)

Parameters:

Properties

className

String MQA.base final

Inherited from MQA.Base

guid

String

Inherited from MQA.Base

A unique id for the object

parentCollections

Array

Inherited from MQA.Base

reservedProperties

String

Inherited from MQA.Base

A list (comma-separated string) of 'private' properties

Methods

_duco

(
  • key
  • value
)
private

Inherited from MQA.Base

What?

Parameters:

_facio

(
  • key
  • value
)
private

Inherited from MQA.Base

No idea what this means or does

Parameters:

addFlow

()

Adds the traffic flow overlays

addIncidents

()

Caches incidents

addMarkets

()

Adds the markets to the map

dispose

()

Inherited from MQA.Base

Destroys the object. You must provide an implementation of this when extending the object to clean up after yourself

draw

()

Inherited from MQA.Base

Stubbed for sub-objects

duco

() private

Inherited from MQA.Base

Stubbed for sub-objects. This function will return a calculated value for any specified key instead of returning the naked value. duco - from the Latin: to calculate

facio

() private

Inherited from MQA.Base

Stubbed for sub-objects. Performs any actions or calculations needed when the specified key,value pair is set.

facio - from the Latin: to make, do, act, perform

getValue

(
  • pcKey
)
Mixed | Undefined

Inherited from MQA.Base

Returns the value at the specified key if it exists, undefined otherwise.

Parameters:

  • pcKey String

    The property name of the value to get.

Returns <Mixed | Undefined>

The value of the specified property name. If the specified property does not exist, undefined is returned.

isAvailable

() Boolean

is available

Returns <Boolean>

isFunction

(
  • fCheck
)
private

Inherited from MQA.Base

If fCheck is a function, return fCheck. Otherwise, return undefined.

Parameters:

lookupGetter

(
  • obj
  • name
)
private

Inherited from MQA.Base

Looks up a getter for an object and returns the function.

Parameters:

  • obj Object

    The object to find the accessor on

  • name Object

    Property name

lookupSetter

(
  • obj
  • name
  • restrict
)
private

Inherited from MQA.Base

Looks up a setter for an object and returns the function.

Parameters:

  • obj Object

    The object to find the accessor on

  • name Object

    Property name

  • restrict Object

    If true then only declared setters will be returned

onFlowAdded

(
  • e
)

Fired when the flow image is added.

Parameters:

onFlowRemoved

(
  • e
)

Fired when the flow image is removed.

Parameters:

onIncidentsAdded

(
  • e
)

Fired when incidents are added.

Parameters:

onIncidentsRemoved

(
  • e
)

Fired when the incidents are removed.

Parameters:

onIncidentTimeout

(
  • e
)

Parameters:

onMarketsAdded

(
  • e
)

Fired when markets are added.

Parameters:

onMarketsRemoved

(
  • e
)

Fired when the markets are removed.

Parameters:

onMarketTimeout

(
  • e
)

Does nothing and is called from nowhere ... sweet

Parameters:

override

(
  • key
)

Inherited from MQA.Base

Removes the default behavior for the specified property. Used when creating objects derived from MQA.Base where the default behavior is not preferable.

Parameters:

  • key String | Array

    Takes a string or an array of strings as a parameter.

processIncidentCollection

(
  • e
)

Adds the shape collection to the map.

Parameters:

processIncidentTimeout

(
  • e
)

Parameters:

processMarketCollection

(
  • e
)

Handles the dataloaded event of the collection. Used to add the collection to the map.

Parameters:

processMarketTimeout

(
  • e
)

Does nothing and is called from nowhere ... sweet

Parameters:

refresh

()

Refreshes traffic instances on the map

removeFlow

()

Removes traffic flow overlays

removeIncidents

()

removeMarkets

()

Removes the markets from the map

setIncidentIcon

(
  • incident
  • poi
)

Sets the incident icon. Can be overridden to set custom icons

Parameters:

setInfoWindowContent

(
  • incident
  • poi
)

Sets the content of the info window. Can be overridden to set custom content.

Parameters:

setRolloverContent

(
  • incident
  • poi
)

Sets the rollover window's content for the incident. Should be overridden to set the rollover content

Parameters:

setValue

(
  • pcKey
  • pcValue
)
Boolean

Inherited from MQA.Base

Sets the specified property to the specified value. Properties contained within reservedProperties will not be set and will return false.

Parameters:

  • pcKey String

    The property to set.

  • pcValue Mixed

    The value to set the property to.

Returns <Boolean>

true if the key exists and is set successfully, otherwise false.

setValues

(
  • pcValues
)
Number

Inherited from MQA.Base

Sets multiple properties for the object.

Parameters:

  • pcValues Object

    The key:value pairs to set where "key" is the property name and "value" is the value to set.

Returns <Number>

the number of objects set successfully