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. |
Example
{
"clickable": true,
"icon": "https://app.mapsindoors.com/mapsindoors/cms/assets/icons/misc/default-marker.png?71488",
"iconScale": 1.0,
"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"
"polygonStrokeOpacity"
"polygonStrokeWeight"
"polygonVisible": false
"polygonZoomFrom": null,
"polygonZoomTo": null
}