Class

DisplayRule

DisplayRule()

Constructor

# new DisplayRule()

Properties:
Name Type Attributes Default Description
clickable boolean <optional>
true Determines whether location will fire a click event when clicked.
icon string <optional>
"https://app.mapsindoors.com/mapsindoors/cms/assets/icons/misc/default-marker.png?71488" Icon url.
iconScale number <optional>
1.0
iconSize Object <optional>
{ width: 20, height: 20 }
iconVisible boolean <optional>
true Determines whether the icon should be displayed or not.
label string <optional>
"{{name}}" Label template.
labelZoomFrom number <optional>
16 Minimum zoom level a label should be displayed at.
labelZoomTo number <optional>
22 Maximum zoom level a label should be displayed at.
labelVisible boolean <optional>
true Determines whether the label should be displayed or not.
labelMaxWidth number <optional>
Sets the maximum width of the label in pixels.
polygonFillColor string <optional>
"#3071D9" The fill color. See https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
polygonFillOpacity number <optional>
0.2 The fill opacity between 0.0 and 1.0
polygonStrokeColor string <optional>
"#3071D9" The stroke color. See https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
polygonStrokeOpacity number <optional>
1.0 The stroke opacity between 0.0 and 1.0
polygonStrokeWeight number <optional>
2.0 The stroke width in pixels.
polygonVisible boolean <optional>
false Determines whether a polygon should be displayed or not.
polygonZoomFrom number <optional>
18 The minimum zoom level the polygon is displayed at.
polygonZoomTo number <optional>
99 The maximum zoom level the polygon is displayed at.
visible boolean <optional>
true It toggles visibility for the icon, the label, and the polygon. When set to false all elements will be hidden. When set to true only the elements which visibility already is true will be shown.
zoomFrom number <optional>
16 The minimum zoom level the icon, the label, and the polygon is displayed at.
zoomTo number <optional>
22 The maximum zoom level for the icon, the label, and the polygon is displayed at.
wallsVisible boolean <optional>
true Determines wether wall extrusion should be displayed or not.
wallsColor string <optional>
"#aeb9cb" The color of the wall extrusion. See https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
wallsHeight number <optional>
2 The height of the wall extrusion in meters.
wallsZoomFrom number <optional>
16 The minimum zoom level the wall extrusion is displayed at.
wallsZoomTo number <optional>
23 The maximum zoom level the wall extrusion is displayed at.
extrusionVisible boolean <optional>
true Determines wether extrusion should be displayed or not.
extrusionColor string <optional>
"#aeb9cb" The color of the extrusion. See https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
extrusionHeight number <optional>
2.25 The height of the extrusion in meters.
extrusionZoomFrom number <optional>
16 The minimum zoom level the extrusion is displayed at.
extrusionZoomTo number <optional>
23 The maximum zoom level the extrusion is displayed at.
model2DVisible boolean <optional>
true It toggles visibility for 2D model.
model2DZoomFrom number <optional>
16 The minimum zoom level the 2D model is displayed at.
model2DZoomTo number <optional>
22 The maximum zoom level the 2D model is displayed at.
model2DModel string <optional>
null 2D model.
model2DWidthMeters number <optional>
0 2D model width in meters.
model2DHeightMeters number <optional>
0 2D model height in meters.
model2DBearing number <optional>
0 2D model bearing in degrees from north.
model3DVisible boolean <optional>
Determines wether 3D model should be displayed or not.
model3DModel string <optional>
null URL to the 3D model in GLB format.
model3DRotationX number <optional>
0 The rotation of the 3D model along the X axis.
model3DRotationY number <optional>
0 The rotation of the 3D model along the Y axis.
model3DRotationZ number <optional>
0 The rotation of the 3D model along the Z axis.
model3DZoomFrom number <optional>
16 The minimum zoom level the 3D model is displayed at.
model3DZoomTo number <optional>
22 The maximum zoom level the 3D model is displayed at.
Example
{
  "clickable": true,
  "icon": "https://app.mapsindoors.com/mapsindoors/cms/assets/icons/misc/default-marker.png?71488",
  "iconScale": 1,
  "iconSize": { width: 20, height: 20 },
  "iconVisible": true,
  "label": "{{name}}",
  "visible": true,
  "zoomFrom": 19,
  "zoomTo": 21,
  "labelVisible": true,
  "labelZoomFrom": null,
  "labelZoomTo": null,
  "labelMaxWidth": 80,
  "polygonFillColor": null,
  "polygonFillOpacity": null,
  "polygonStrokeColor": "#3071D9",
  "polygonStrokeOpacity": 1
  "polygonStrokeWeight": 2
  "polygonVisible": false,
  "polygonZoomFrom": null,
  "polygonZoomTo": null,
  "model2DVisible": true,
  "wallsVisible": true,
  "wallsColor": "#aeb9cb",
  "wallsHeight": 2
  "extrusionVisible": true,
  "extrusionColor": "#aeb9cb",
  "extrusionHeight": 2.25,
  "model2DZoomFrom": 16,
  "model2DZoomTo": 22,
  "model2DModel": null,
  "model2DWidthMeters": 0,
  "model2DHeightMeters": 0,
  "model2DBearing": 0
  "model3DVisible": true,
  "model3DModel": null,
  "model3DRotationX": 0,
  "model3DRotationY": 0,
  "model3DRotationZ": 0,
  "model3DZoomFrom": 16,
  "model3DZoomTo": 22
}