Class: Drawing
- Last UpdatedMay 21, 2025
- 2 minute read
This class represents information about a drawing in a venue, including
drawing's levels and geometries. A Drawing usually represents separate buildings in a Venue.
The associated raw data can be retrieved by using the method H.venues.Drawing#getData
.
Name | Type | Description |
---|---|---|
drawingModel |
Object |
Drawing model provides interface to the raw drawing data loaded from Venues API. |
Extends
Methods
-
This method adds a listener for a specific event.
Note that to prevent potential memory leaks, you must either call
removeEventListener
ordispose
on the given object when you no longer need it. -
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. -
getBoundingBox ()H.geo.Rect
-
Get bounding box of the drawing
Returns:
Type Description H.geo.Rect The drawing bounds. -
getCenter ()H.geo.Point
-
Get center point of the drawing
Returns:
Type Description H.geo.Point The drawing center. -
Get the raw data model for the Drawing
Returns:
Type Description Object The row drawing data model. -
Get id of the drawing
Returns:
Type Description number The drawing id. -
Get id of the drawing in string format
Returns:
Type Description string The drawing id. -
getLevel (id)H.venues.Level
-
Get a drawing level by id
Name Type Description id
number | string Level id
Returns:
Type Description H.venues.Level The level object corresponding to the id. -
getLevels ()Array.<H.venues.Level>
-
Get all drawing levels
Returns:
Type Description Array.<H.venues.Level> Array of drawing's level objects. -
getMainLevel ()H.venues.Level
-
Get main drawing level
Returns:
Type Description H.venues.Level The main level of the drawing. -
Get name of the drawing
Returns:
Type Description string The drawing name. -
getVenue ()H.venues.Venue
-
Get the parent venue object
Returns:
Type Description H.venues.Venue The venue object which drawing is part of. -
This method removes a previously added listener from the
EventTarget
instance.