Maps API for JavaScript Developer's Guide

H.service.venues.Space

Class Summary

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

[ For full details, see the Class Details ]

Method Summary

Table 1. Methods
Methods

getType () : {string}

This method returns type of this space. See Space IATileMember documentation in Venue Maps API for more information.

isFloorSpace () : {boolean}

The method indicates whether the spatial object represents the whole floor space or a space within a floor boundaries that belongs to the floor.

initLabelStyle (labelStyle)

This method sets a custom style to use for rendering labels. It should be called before the space is rendered for the first time, otherwise it has no any effect.

getFloor () : {H.service.venues.Floor}

This method retrieves the parent object - floor (see H.service.venues.Floor) - of the space.

getData () : {Object}

This method retrieves the raw data associated with the space. For more details on data formats, see http://developer.here.com/rest-apis/documentation/venue-maps/topics/resource-type-venue-interaction-tile-space.html.

Class Description

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

Constructor Details

H.service.venues.Space(provider, uid, data)

Parameters:
 
provider:
{H.map.provider.ObjectProvider}
 
The provider of the given object.
uid:
{string}
 
The unique identifier of the space object
data:
{*}
 
The meta data for the space object

Method Details

getType () : {string}

This method returns type of this space. See Space IATileMember documentation in Venue Maps API for more information.

Returns:
 
{string}
The type of the space

isFloorSpace () : {boolean}

The method indicates whether the spatial object represents the whole floor space or a space within a floor boundaries that belongs to the floor.

Returns:
 
{boolean}
true if the given spatial object represents the floor space, otherwise false.

initLabelStyle (labelStyle)

This method sets a custom style to use for rendering labels. It should be called before the space is rendered for the first time, otherwise it has no any effect.

Note that to retain design consistency, it is not possible to change the font family and the size of the labels.

Example

  space.initLabelStyle({
  fillcolor: 'rgba(255, 0, 0, 0.7)'
  });
Parameters:
 
labelStyle:
{(H.map.SpatialStyle | H.map.SpatialStyle.Options)}
 
An object containing a custom label style

getFloor () : {H.service.venues.Floor}

This method retrieves the parent object - floor (see H.service.venues.Floor) - of the space.

Returns:
 
{H.service.venues.Floor}
The parent object of the given Space instance

getData () : {Object}

This method retrieves the raw data associated with the space. For more details on data formats, see http://developer.here.com/rest-apis/documentation/venue-maps/topics/resource-type-venue-interaction-tile-space.html.

Returns:
 
{Object}
A raw space data object