Class: Level

H.venues.Level

new H.venues.Level (levelModel)

This class represents information about a level in a venue, including level's geometries. The associated raw data can be retrieved by using the method H.venues.Level#getData.

Name Type Description
levelModel Object

Level model provides interface to the raw level data loaded from Venues API.

Extends

Methods

addEventListener (type, handler, opt_capture, opt_scope) inherited overrides

This method adds a listener for a specific event.

Note that to prevent potential memory leaks, you must either call removeEventListener or dispose on the given object when you no longer need it.

Name Type Description
type string

The name of the event

handler function

An event handler function

opt_capture boolean optional

true indicates that the method should listen in the capture phase (bubble otherwise)

opt_scope Object optional

An object defining the scope for the handler function

addOnDisposeCallback (callback, opt_scope) inherited

This method adds a callback which is triggered when the EventTarget object is being disposed.

Name Type Description
callback function

The callback function.

opt_scope Object optional

An optional scope for the callback function

dispatchEvent (evt) inherited

This method dispatches an event on the EventTarget object.

Name Type Description
evt H.util.Event | string

An object representing the event or a string with the event name

dispose () inherited

This method removes listeners from the given object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners.

getData ()Object inherited overrides

Get the raw data model for the Level

Returns:
Type Description
Object The row level data model.

getDrawing ()H.venues.Drawing

Get the parent drawing object

Returns:
Type Description
H.venues.Drawing The drawing object which the level is part of.

getGeometries ()Array.<H.venues.Geometry>

Get all level geometry objects

Returns:
Type Description
Array.<H.venues.Geometry> Array of geometry objects for the level.

getGeometry (id)H.venues.Geometry

Get a level geometry by id

Name Type Description
id number | string

The geometry id

Returns:
Type Description
H.venues.Geometry The geometry object corresponding to the id.

getId ()number Deprecated : since 3.1.34.2

Get id of the level

Returns:
Type Description
number The level id.

getIdentifier ()string

Get id of the level in string format

Returns:
Type Description
string The level id.

getName ()string

Get name of the level

Returns:
Type Description
string The level name.

getShortName ()string

Get short name of the level

Returns:
Type Description
string The short name.

getVenue ()H.venues.Venue

Get the parent venue object

Returns:
Type Description
H.venues.Venue The venue object which the level is part of.

getZIndex ()number

Get z-index of the level

Returns:
Type Description
number The level z-index.

isMain ()boolean

The method shows whether the level is the main level of the drawing which it belongs to

Returns:
Type Description
boolean If true, this is the main level of the drawing.

removeEventListener (type, handler, opt_capture, opt_scope) inherited overrides

This method removes a previously added listener from the EventTarget instance.

Name Type Description
type string

The name of the event

handler function

A previously added event handler

opt_capture boolean optional

true indicates that the method should listen in the capture phase (bubble otherwise)

opt_scope Object optional

An object defining the scope for the handler function