[API](/solutions/geotoolkit/geotoolkit_js/apis/readme) / [geotoolkit](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit) / [gauges](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.gauges) / [defaults](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.gauges#defaults) / [HorizontalTraffic](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.gauges#horizontaltraffic) / HorizontalTraffic

# Class: HorizontalTraffic

[defaults](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.gauges#defaults).[HorizontalTraffic](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.gauges#horizontaltraffic).HorizontalTraffic

Implements a horizontal traffic gauge with three lights, green, yellow, and red. When a light is not active,
it is light grey.

## Hierarchy

- [`AbstractFactory`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.gauges.abstractfactory.abstractfactory)
↳ **`HorizontalTraffic`**


## Table of contents

Constructors
- [new HorizontalTraffic()](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.gauges.defaults.horizontaltraffic.horizontaltraffic.md#new horizontaltraffic())


Methods
| [createGauge](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.gauges.defaults.horizontaltraffic.horizontaltraffic#creategauge) | [getClassName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.gauges.defaults.horizontaltraffic.horizontaltraffic#getclassname) | [getGaugeProperties](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.gauges.defaults.horizontaltraffic.horizontaltraffic#getgaugeproperties) |
|  --- | --- | --- |
| [getGaugeType](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.gauges.defaults.horizontaltraffic.horizontaltraffic#getgaugetype) | [getName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.gauges.defaults.horizontaltraffic.horizontaltraffic#getname) | [getClassName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.gauges.defaults.horizontaltraffic.horizontaltraffic#getclassname-1) |


## Contents

Constructors
#### new HorizontalTraffic()

• **new HorizontalTraffic**()

#### Overrides

AbstractFactory.constructor

Methods
#### createGauge

▸ **createGauge**(`params`): [`TrafficGauge`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.gauges.trafficgauge.trafficgauge)

Returns a gauge ready for use

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `params` | `Partial`<[`Options`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.gauges#trafficgauge#options)&gt; | JSON with overriding properties |


#### Returns

[`TrafficGauge`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.gauges.trafficgauge.trafficgauge)

Gauge with applied default and overridden properties

#### Overrides

[AbstractFactory](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.gauges.abstractfactory.abstractfactory).[createGauge](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.gauges.abstractfactory.abstractfactory#creategauge)

#### getClassName

▸ **getClassName**(): `string`

#### Returns

`string`

#### Inherited from

[AbstractFactory](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.gauges.abstractfactory.abstractfactory).[getClassName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.gauges.abstractfactory.abstractfactory#getclassname)

#### getGaugeProperties

▸ **getGaugeProperties**(): [`Options`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.gauges#trafficgauge#options)

Returns properties pertaining to the gauge implemented by this factory. This function is called by CreateGauge() method in this class and is mainly for internal use.

#### Returns

[`Options`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.gauges#trafficgauge#options)

#### Overrides

[AbstractFactory](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.gauges.abstractfactory.abstractfactory).[getGaugeProperties](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.gauges.abstractfactory.abstractfactory#getgaugeproperties)

#### getGaugeType

▸ **getGaugeType**(): `string`

Gets the type of the gauge which this factory implements

#### Returns

`string`

#### Inherited from

[AbstractFactory](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.gauges.abstractfactory.abstractfactory).[getGaugeType](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.gauges.abstractfactory.abstractfactory#getgaugetype)

#### getName

▸ **getName**(): `string`

Gets the name of this implementation

#### Returns

`string`

#### Inherited from

[AbstractFactory](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.gauges.abstractfactory.abstractfactory).[getName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.gauges.abstractfactory.abstractfactory#getname)

#### getClassName

▸ `Static` **getClassName**(): `string`

#### Returns

`string`

#### Inherited from

[AbstractFactory](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.gauges.abstractfactory.abstractfactory).[getClassName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.gauges.abstractfactory.abstractfactory#getclassname-1)