Skip to content
English
  • There are no suggestions because the search field is empty.

Wayfinder Destination Database Class

This class contains specific details about each destination within the project. A sub destination is a destination that is physically contained within the mesh of another. For example, this might be a cafe inside of a large shop.

This class inherits and therefore includes all the methods and functions defined the standard wayfinder database base class. This class exports the following functions:

byCategoryId(categoryId)

function

Returns an instance of WayfinderDestinationDatabase containing only destinations belonging to the specified categoryId

byName(name, partialMatch)

function

Runs a case-insensative search of name against all of the destinations and returns an instance of WayfinderDestinationDatabase containing matches. If partialMatch is true then the search string name can appear anywhere within the destination name, else it must be an exact match.

fullDestinations

function

Returns an instance of WayfinderDestinationDatabase that contains only main destinations, ie, no sub-destinations.

onFloor(floorId)

function

Returns an instance of WayfinderDestinationDatabase containing only the destinations on the specified floorId

subDestinations

function

Returns an instance of WayfinderDestinationDatabase containing only sub destinations

uniqueCategories

function

Returns an array of destination category Ids in use by this instance.

Each record in the WayfinderDestinationDatabase contains the following properties and functions (note some of the properties can also be null):

address

property (r)

A string containing the street address of the destination

categories

property (r)

An array containing a list of category Ids associated with this destination.

See Wayfinder Destination Category Database

color

property (r)

Contains an object with properties normal, active and selected. These strings contain default colour states for any mesh associated with this destination (in #rrggbb format). These can be null.

description

property (r)

A textual description of the destination.

destination_photo

property (r)

A URL of a photo of the destination.

fadeToDefault(speed)

property (r)

A function that causes the mesh to change to its default colour over speed milliseconds.

fadeToHover(speed)

property (r)

A function that causes the mesh to change to its hover colour over speed milliseconds.

fadeToSelected(speed)

property (r)

A function that causes the mesh to change to its selected colour over speed milliseconds.

flagship

property (r)

Set to 1 if this is a flagship store. Flagship stores have a higher priority and can also optionally display a graphic instead of showing its name.

floor

property (r)

The ID of the floor/map this destination is on.

id

property (r)

The unique ID for this destination.

label

property (r)

Details about how a label should be drawn ontop of the mesh. This object contains the following properties:

color: { normal, selected, active } Override label colours for the various states

height: Height of the label (usually negative)

position: {x, y, z} Position of the top left corner of the label

rotation: Angle in degrees to rotate the label

width: Width of the label

local_description

property (r)

Additional information about the specific instance of a destination.

location_description

property (r)

A textual description of the surroundings near this destination.

logo

property (r)

A URL with the logo for this destination, this will be a colour logo.

map_logo

property (r)

A URL with the logo for the destination for rendering on the top of the mesh. This is only used if flagship=1

meshObject

property (r)

Exposes the WayfinderDestinationMesh attached to this destination.

name

property (r)

The name of the destination

node

property (r)

An array of nodes inside the destination that can be used during routing

object

property (r)

The name of the mesh to attach to in the 3D map.

opening_arr

property (r)

An array containing the following indexes: sat, sun, mon, tue, wed, thur, fri. Each of these elements contains an object with the following properties:

text: A Textual description of the day

value: If this entry is valid or not

oh: Text containing the opening hour in hh:mm format

ch: text containing the closing hour in hh:mm format

opening_txt

property (r)

A simple description of the opening hours.

panToView(animate)

property (r)

Pans the map so that the destination is located in the center of the screen. The animate parameter controls if this happens instantly or smoothly moves.

parent_destination

property (r)

If this is a sub destination then this will be a reference to the Wayfinder Destination Database record for the parent

phone_number

property (r)

A phone number associated with the destination.

related_destinations

property (r)

An array of manually selected related destinations.

sub_destination

property (r)

Set to true if this is a sub destination.

sub_destinations

property (r)

An array of sub-destinations contained within this destination

tags

property (r)

An array of text tags used to help categorise this destination

website

property (r)

The URL of the destinations associated website.