Class: Geometry

H.venues.Geometry

new H.venues.Geometry (geometryModel)

This class represents a geometry in a venue. Each geometry object contains associated raw data, which can be retrieved by using the method H.venues.Geometry#getData.

Name Type Description
geometryModel Object

Geometry model provides interface to the raw geometry 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.

getAddress ()string

Get address of the geometry as defined in the venue data

Returns:
Type Description
string The address of the geometry.

getCenter ()H.geo.Point

Get center point of the geometry

Returns:
Type Description
H.geo.Point The geometry center.

getData ()Object inherited overrides

Get the raw data model for the Geometry

Returns:
Type Description
Object The row geometry data model.

getId ()number Deprecated : since 3.1.34.2

Get id of the geometry

Returns:
Type Description
number The geometry id.

getIdentifier ()string

Get id of the geometry in string format

Returns:
Type Description
string The geometry id.

getLevel ()H.venues.Level

Get the parent level object of the geometry

Returns:
Type Description
H.venues.Level The level object which geometry is part of.

getName ()string

Get name of the geometry

Returns:
Type Description
string The geometry name.

getVenue ()H.venues.Venue

Get the parent drawing object of the geometry

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

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

toGeoJSON ()object

To obtain a GeoJSON representation of the given geometry.

Returns:
Type Description
object The Geometry representation.