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

JS Web Settings

This section explains the JSON settings you can pass to the map upon load. Every field is optional, and in fact, the entire settings can be null.

See: Example Settings Block 

 
 
Key Type Default Value Description    
angle number >=0 <=360 45 Map rotational angle to use at the start.    
antialiasing boolean true If antialiasing is enabled during render.    
background @Settings: background
{"color":
{"r":255,"g":255,"b":255,
"a":255},"url":null}
Background behind the map    
defaultLanguage string "ENGLISH_UK" The default language to use if no language is set    
destinations  @Settings: destinations 
{"hover":
{"r":224,"g":152,"b":76,"
a":255},"selected":
{"r":76,"g":162,"b":224,
a":255}}
 
default hover and selected colours for destinations     
icon @Settings: icon
{"combineWithFloating
Labels"
:true,"fadeTime":250,
"inFrontOfFloatingLabels"
:false,"maxSize":100,
"minSize":10,
"overlapMargin":2,
"scale":5,
"transitIconsHavePriority"
:true,"yPosition":0}
settings for amenity and other overlaid icons     
initialZoomLevel number >=0 <=100 - The initial zoom level for the map.    

initialZoomMode

"BoundaryTypeFloor
Area" | 
"BoundaryTypeFloor
Area"

- The initial zoom mode for the map.    
kioskMaxZoom number 1.8 Max zoom property for kiosks.    
kioskMaxZoom number 1.8 Max zoom property for kiosks.    
label @Settings: label  
{"color":
{"r":0,"g":0,"b":0,
"a":255},
"float"
:{"centerOnLabel"
:true,"dots"
:{"color":{"r":255,
"g":0,"b":0,"a":255},
"enabled":true,"shadow"
:{"r":0,"g":0,"b":0,
"a":255},
"shadowDistance":1,
"shadowSize":4,
"size":3,
"useLabelColor"
:true},
"enabled":true,"font"
:{"alignment":"center",
"name":"Lato","size":15,
"weight":600},
"overlapMargin":2,
"prioritizeByLabelSize"
:false,"shadow":{"r":0,
"g":0,"b":0,"a":255},
"shadowDistance":1,
"shadowSize":4,
"showLabelOnFlagship"
:false,
"stopAfterClashCount"
:2,"useLabelColor":true},
"hover":{"r":0,"g"
:255,"b":255,"a":255},
"prioritizeByLabelSiz
":false,"selected"
:{"r":255,"g":255,
"b":0,"a":255},
"shadowColor"
:{"r":255,"g":255,"b"
:255,"a":255},
"shadowDistance":4,
"shadowHover":{"r":0,"g"
:0,"b":0,
"a":255},
"shadowSelected"
:{"r":0,"g":0,"b":0,
"a":255},
"shadowSize":4,
"style"
:{"alignment":"center",
"fontName":"arial",
"padding"
:10,"sizeInPx":30,
"weight"
:"normal"},
"yPosition":0}

 

destination name text rendering     
language string "ENGLISH_UK" The current language being used by the Wayfinder.    
languages string[] [] The languages supported by the project    
latlong @Settings: latlong | null null Geologcation settings    
lighting @Settings: lighting
{"ambient":
{"color":{"r":102,"g"
:102,
"b":102,"a":255}},
"enableSpecular"
:false,"hemisphere"
:{"groundcolor":
{"r":144,"g":144,"b"
:144,"a"
:255},
"skycolor":
{"r":204,"g":204,"b"
:204,"a":
255},
strength":0.25},
"light1":
{"castshadow":false,
"color":{"r":0,"g":0,
"b":0,"a"
:255},
"lookat":{"x":0,"y":0,
"z":0},
"position":{"x":0,"y"
:5,"z":-5},
"strength":0},"light2":
{"castshadow":true,
"color":
{"r":255,"g":255,"b"
:255,"a":255},
"lookat":{"x":0,"y":0,
"z":0},
"position":{"x":-125,
"y":-175,
"z":-300},
"strength":1},
"rotateLights"
:true,
"shadowBias"
:0.00001,
"yahPoint":
{"color":{"r":34,"g"
:34,"b":34,"a":255}
,"exp":20.5,
"linear":20.5,
"strength":1,
"zposition"
:-150}}

 

 map lighting controls     
lowerQuality boolean false If lower quality (less resource intensive) methods should be used.    
mapScaleFactor number 1 A number to convert coordinates into meters.    
 markers   @Settings: markers 
{"end":"","maxSize"
:110,
"minSize":70,"scale
":5,
"start":"","
yPosition":1,
"yah":""}
 settings for markers on the map such as start/end     
perspective boolean true Set to true if the map should start in perspective mode.    
positionChangeTime number 500 Number of milliseconds defining the camera movement duration.    
routeByDistance boolean true If routes generated are by shortest distance (true) or quickest time (false).    
 routeLine   @Settings: routeLine   
{"animSpeed":1,"color":
{"r":255,"g":0,"b"
:0,"a":255},
"color2"
:{"r":255,"g":255,
"b":255,"a":255},
"repeatCount":1,
"size":0.25,
"yPosition":40}

 

how to render the route line animation     
routeTilt number 80 Map tilt to use while route is active, defaults to tilt if undefined.    
scaleChangeTime number 250 Number of milliseconds to change map scale while loading (animation).    
screenPadding number >=1 50 Pixel border size to fit bounds within.    
shadows boolean true If shadows will be rendered on the map.    
startFloorId number | null 0 The primary map to show.    
tilt number 45 Map tilt to use at the start and after routes are cleared.    
timezone string "UTC" The timezone of the destination of the project    
 transitPopups   @Settings: transitPopups   
{"borderRadius":10,
"borderWidth":3,
"colors"
:{"arrow"
:{"r":140,"g":140,
"b":140,"a":255},
"background"
:{"r":255,"g":255,"b"
:255,"a":255},
"border":{"r":0,"g":0,
"b":0,"a":255},
"shadow":{"r":0,"g":0,
"b":0,"a":255},
"text":{"r":0,"g":0,
"b":0,"a":255}},
"font":{"fontName":
"Arial",
"sizeInPx":18,
"weight":"normal"},
"shadowAlpha":0.3,
"shadowDistanceX":10,
"shadowDistanceY":10,
"shadowSize":15}
 popups that appear when changing map/floor     
transitionTime number 500 Time taken by default for all animations, in milliseconds.    
zoomToRoute boolean false If when routing, the map should zoom to fit the route.    
ignoreCDN boolean false INTERNAL    
loadMapUrls boolean true INTERNAL    
 

Settings: background

Key Type Default Value Description
color null | string | @Colour {"r":255,"g":255,"b":255,"a":255} Background colour to show
url string | null null

An image to

show in the background. This is scaled to cover the entire of the background.

Settings: destinations

Key Type Default Value Description
hover null | string | @Colour {"r":224,"g":152,"b":76,"a":255} The hover colour
selected null | string | @Colour {"r":76,"g":162,"b":224,"a":255} The selected colour

Settings: icon

Key Type Default Value Description
combineWithFloatingLabels boolean true If true, then amenity icons and destination labels have equal priority.
fadeTime number >=0 250 Time taken (milliseconds) to fade the icons in and out.
inFrontOfFloatingLabels boolean false If true, amenity icons appear in front of floating destination labels, if false, destination labels have priority.
maxSize number >=0 100 Maximum size allowed while zooming.
minSize number >=0 10 Minimum size allowed while zooming.
overlapMargin number >=1 2 How much overlap (pixels) an icon can be before it is removed.
scale number 5 Default scale factor to use for the normal size of the icons.
transitIconsHavePriority boolean true If true, then transit icons always have priority over everything else.
yPosition number >=0 0 The y-position to place the route line.

Settings: label

Key Type Default Value Description
color null | string | @Colour {"r":0,"g":0,"b":0,"a":255} Colour of the text
float @Settings: label.float  
{"centerOnLabel":true,
"dots":{"color"
:{"r":255,"g":0,"b":0,"a":255},
"enabled":true,
"shadow":{"r":0,"g":0,"b":0,"a"
:255},
"shadowDistance":1,
"shadowSize":4,
"size":3,
"useLabelColor":true},
"enabled":true,
"font":{"alignment":"center",
"name":"Lato",
"size":15,"weight":600},
"overlapMargin":2,
"prioritizeByLabelSize":false,
"shadow":{"r":0,"g":0,"b":0,"a"
:255},
"shadowDistance":1,
"shadowSize":4,
"showLabelOnFlagship":false,
"stopAfterClashCount":2,
"useLabelColor":true}
 Controls floating labels 
hover null | string | @Colour {"r":0,"g":255,"b":255,"a":255} The hover colour of the text
prioritizeByLabelSize boolean false Prioritize label by label size, if false, its prioritized by the attached mesh bounding box size
selected null | string | @Colour {"r":255,"g":255,"b":0,"a":255} The selected colour for the text
shadowColor null | string | @Colour {"r":255,"g":255,"b":255,"a":255} Colour to use for the shadow/stroke around the text
shadowDistance number >=0 4 How many pixels to expand the stroke/shadow by
shadowHover null | string | @Colour {"r":0,"g":0,"b":0,"a":255} Hover stroke/shadow colour
shadowSelected null | string | @Colour {"r":0,"g":0,"b":0,"a":255} Selected hover/stroke colour
shadowSize number >=0 4 The size of the blur in pixels to apply to the shadow
style @Settings: label.style
{"alignment":"center",
"fontName":"arial",
"padding":10,
"sizeInPx":30,
"weight":"normal"}
Font details
yPosition number >=0 0 The position of the label above the map, in pixels

Settings: latlong

Key Type Default Value Description
start Object - Usually the top-left corner of the map
end Object - Usually the bottom-right corner of the map

Settings: lighting

If shadows will be rendered on the map. 

Settings: markers

 

Key Type Default Value Description
align "top" | "bottom" | "center" | string - Alignment of the marker (e.g., bottom, center, etc.).
end string "" The marker to use for the end location.
maxSize number >=1 110 Maximum size of the marker in pixels.
minSize number >=1 70 Minimum size of the marker in pixels.
scale number >=0 5 Scale factor for the marker.
start string "" The marker to use for the start location.
yPosition number >=0 1 The y-position to place the marker.
yah string "" The marker to use for the "you are here" location.

 

Settings: routeLine

Key Type Default Value Description
animSpeed number >=0.1 1 Speed of the route line animation
color null | string | @Colour {"r":255,"g":0,"b":0,"a":255} Main route line colour
color2 null | string | @Colour {"r":255,"g":255,"b":255,"a":255} Highlight/moving line segment colour
repeatCount number >=0 1 How many times the route line animation repeats
size number >=0 0.25 Size of the route line
yPosition number >=0.1 40 The y-position to place the route line

Settings: transitPopups

Key Type Default Value Description
borderRadius number >=0 10 Used to make the popup rounded, this is in pixels.
borderWidth number >=0 3 The width of the border/stroke around the popup in pixels.
colors @Settings: transitPopups.colors
{"arrow":
{"r":140,"g":140,
"b":140,"a":255},
"background":
{"r":255,"g":255,
"b":255,"a":255},
"border":{"r":0,"g":0,
"b":0,"a":255},
"shadow":{"r":0,"g":0,
"b":0,"a":255},
"text":{"r":0,"g":0,
"b":0,"a":255}}

 

Colors used in the popup.
font @Settings: transitPopups.font   Font used in the popup.
shadowAlpha number >=0 <=1 0.3 The alpha brightness of the shadow. 0=invisible, 1=opaque.
shadowDistanceX number >=0 10 The horizontal offset of the shadow in pixels.
shadowDistanceY number >=0 10 The vertical offset of the shadow in pixels.
shadowSize number >=0 15 The radius of the blur to apply to the shadow in pixels.

Settings: label.float

Key Type Default Value Description
centerOnLabel boolean true If true the label floats centered on the label, false it centers on the mesh.
 dots   @Settings: label.float.dots 
{"color":
{"r":255,"g":0,
"b":0,"a":255},
"enabled":true,"shadow":
{"r":0,"g":0,"b":0,"
a":255},
"shadowDistance":1,
"shadowSize":4,"size":3,
"useLabelColor":true}
 Rendering a dot if the label has been removed 
enabled boolean true If true, labels float above destinations
font @Settings: label.float.font
{"alignment":"center",
"name":"Lato",
"size":15,
"weight":600}

 

Floating font to use
overlapMargin number >=0 2 How close labels can be (in pixels) before one is removed
prioritizeByLabelSize boolean false Prioritize label by label size, if false, its prioritized by the attached mesh bounding box size
shadow null | string | @Colour {"r":0,"g":0,"b":0,"a":255} Shadow colour to use when rendering the dot
shadowDistance number >=0 1 How many pixels to expand the stroke/shadow by
shadowSize number >=0 4 The size of the blur in pixels to apply to the shadow
showLabelOnFlagship boolean false If true a label is rendered on flagship destinations.
stopAfterClashCount number >=0 2 If set to 0 this is disabled. Otherwise this is the number of overlaps/clashes detected before label rendering will be stopped.
useLabelColor boolean true If true, the above colour is ignored and the colour is taken from the label.

Settings: label.style

Key Type Default Value Description
alignment string "center" Text alignment of the text during wordwrap
fontName string "arial" CSS name of the font
padding number >=0 10 Padding around the outside of the font
sizeInPx number >=1 30 Size of the font in pixels
weight string | number "normal" Font weight

Settings: lighting.ambient

Key Type Default Value Description
color null | string | @Colour {"r":102,"g":102,"b":102,"a":255} Ambient lighting level

Settings: lighting.hemisphere

Key Type Default Value Description
groundcolor null | string | @Colour {"r":144,"g":144,"b":144,"a":255} Colour of the ground
skycolor null | string | @Colour {"r":204,"g":204,"b":204,"a":255} Colour of the sky
strength number >=0 0.25 Strength of the lighting effect

Settings: lighting.light1

Key Type Default Value Description
castshadow boolean false If this light will cast shadows on the map
color null | string | @Colour {"r":0,"g":0,"b":0,"a":255} Colour of the light
lookat @Position {"x":0,"y":0,"z":0} Target to use when working out the light source direction
position @Position {"x":0,"y":5,"z":-5} Position of the light in normalised coordinates.
strength number >=0 0 Strength of the light

Settings: lighting.light2

Key Type Default Value Description
castshadow boolean true If this light will cast shadows on the map
color null | string | @Colour {"r":255,"g":255,"b":255,"a":255} Colour of the light
lookat @Position {"x":0,"y":0,"z":0} Target to use when working out the light source direction
position @Position {"x":-125,"y":-175,"z":-300} Position of the light in normalised coordinates.
strength number >=0 1 Strength of the light

Settings: lighting.yahPoint

Key Type Default Value Description
color null | string | @Colour {"r":34,"g":34,"b":34,"a":255} Colour of the yah point
exp number 20.5 Exponential falloff for yah point
linear number 20.5 Linear falloff for yah point
strength number >=1 1 Strength of the yah point
zposition number -150 Z position for yah point

 Settings: transitPopups.colors

Key Type Default Value Description
arrow null | string | @Colour {"r":140,"g":140,"b":140,"a":255}

 

The colour of the action arrow shown on the popup.
background

 

null | string | @Colour {"r":255,"g":255,"b":255,"a":255} Popup background colour.
border null | string | @Colour {"r":0,"g":0,"b":0,"a":255} The colour of the border used by the popup.
shadow null | string | @Colour {"r":0,"g":0,"b":0,"a":255}

 

The colour of the shadow behind the popup.
text

 

null | string | @Colour {"r":0,"g":0,"b":0,"a":255}

 

 

Text colour within the popup.

Settings: transitPopups.font

Key Type Default Valu Description
fontName

 

string

 

"Arial"

 

CSS Name of the font.
sizeInPx number >=1 18

 

Size of the font, in pixels.
weight string "normal" font-weight to use.

Settings: label.float.dots

Key Type Default Value Description
color

 

null | string | @Colour {"r":255,"g":0,"b":0,"a":255} Colour to use when rendering the dot
enabled boolean true If true this feature is enabled.
shadow null | string | @Colour {"r":0,"g":0,"b":0,"a":255}

 

Shadow colour to use when rendering the dot
shadowDistance number >=0 1

 

 

How many pixels to expand the stroke/shadow by
shadowSize number >=0 4

 

The size of the blur in pixels to apply to the shadow
size number >=1

 

3 Size in pixels of the dot.
useLabelColor boolean true If true, inherit the colour from the label settings

Settings: label.float.font

Key Type Default Value Description
alignment string "center" css text alignment for wordwap
name string "Lato" CSS name of the font
size number >=1 15 Size of the font in pixels
weight string | number 600 font-weight to use

Colour

Key Type Default Value Description
r number >=0 <=255 - The Red component of the colour
g number >=0 <=255 - The Green component of the colour
b number >=0 <=255 - The Blue component of the colour
a number >=0 <=255 - The Alpha component of the colour

 Position

Key Type Default Value Description
x number 0 X coordinate
y number 0 Y coordinate
z number 0 Z coordinate