MPDisplayRule

This class represents a Display Rule, a MapsIndoors concept which describes a number of styling values for MapsIndoors objects. The values contained within dictates how the MapsIndoors SDK renders a given object on the map (POI, area, selection, model, etc.). Display Rule data can be edited through the MapsIndoors CMS, and can be modified on runtime in SDKs. Invoke reset on a MPDisplayRule to reset all values to those from the CMS.

Constructors

Link copied to clipboard
Link copied to clipboard
Create an empty MPDisplayRule.
Link copied to clipboard
Create an empty MPDisplayRule.
Link copied to clipboard
open fun MPDisplayRule(@NonNull id: String)
Create an empty MPDisplayRule.

Functions

Link copied to clipboard
Bulk update this Rule with the fields set in the MPDisplayRuleOptions
Link copied to clipboard
The fill color of the badge, given as a hex-color string in the form of #AARRGGBB or #RRGGBB
Link copied to clipboard
The position of the badge relative to the icon, when an icon is visible
Link copied to clipboard
the radius of the badge fill color.
Link copied to clipboard
Get the scale of the badge
Link copied to clipboard
Get the color of the stroke around the badge, given as a hex-color string in the form of #AARRGGBB or #RRGGBB
Link copied to clipboard
The width of the stroke line around the badge in screen pixels (PX)
Link copied to clipboard
get badge "zoom from" value, dictating from which zoom level the badge should stop being shown
Link copied to clipboard
get badge "zoom to" value, dictating from which zoom level the badge should stop being shown
Link copied to clipboard
Get extrusion color (hex color code e.g.
Link copied to clipboard
Get extrusion height in meters
Link copied to clipboard
Get the extrusion Lightness Factor (-1.0 = Dark, 0.0 no lighting added, 1.
Link copied to clipboard
Get extrusion "zoom from" value, dictating from which zoom level the extrusion should stop being shown
Link copied to clipboard
Get extrusion "zoom to" value, dictating from which zoom level the extrusion should stop being shown
Link copied to clipboard
Get the display rule's icon asynchronously
Link copied to clipboard
Get icon placement
Link copied to clipboard
Get icon scale
Link copied to clipboard
Get icon size
Link copied to clipboard
Get the icon URL
Link copied to clipboard
open fun getId(): String
The ID of this rule, it can take the following forms
  • Default rule: "default"
  • CMS main rule: "main"
  • CMS type rule: The name of the type
  • CMS location rule: The location Id of the location
  • Custom rule: No clear form
Link copied to clipboard
Get label text
Link copied to clipboard
Get the max width for label text (in dp).
Link copied to clipboard
Get the bearing of the label.
Link copied to clipboard
Get the blur value of the label halo (in pixels) Blur is the halo's fadeout distance
Link copied to clipboard
Get the color of the label halo (hex color code e.g.
Link copied to clipboard
Get the width of the label halo (in pixels)
Link copied to clipboard
Get the color of the label text (hex color code e.g.
Link copied to clipboard
Get the opacity of the label text as a value between 0.0 and 1.
Link copied to clipboard
Get the size of the label characters (in pixels) (1 pixel is approximately 0.
Link copied to clipboard
Get the type of label for the display rule
Link copied to clipboard
Get the label "zoom from" value, dictating from which zoom level the label should start being shown
Link copied to clipboard
Get the label "zoom to" value, dictating from which zoom level the label should stop being shown
Link copied to clipboard
Get 2D model bearing (rotation in degrees)
Link copied to clipboard
Get 2D model height in meters
Link copied to clipboard
Get 2D model URL
Link copied to clipboard
Get 2D model width in meters
Link copied to clipboard
Get 2D model "zoom from" value, dictating from which zoom level the model should start being shown
Link copied to clipboard
Get 2D model "zoom to" value, dictating from which zoom level the model should stop being shown
Link copied to clipboard
Get 3D model URL
Link copied to clipboard
Get 3D model rotation around the X-axis in degrees
Link copied to clipboard
Get 3D model rotation around the Y-axis in degrees
Link copied to clipboard
Get 3D model rotation around the Z-axis in degrees
Link copied to clipboard
Get 3D model scale
Link copied to clipboard
Get 3D model "zoom from" value, dictating from which zoom level the 3D model should start being shown
Link copied to clipboard
Get 3D model "zoom to" value, dictating from which zoom level the 3D model should stop being shown
Link copied to clipboard
Get polygon fill color (hex color code e.g.
Link copied to clipboard
Get polygon fill opacity (0.0 = invisible, 1.
Link copied to clipboard
Get polygon Lightness Factor (-1.0 = Dark, 0.0 no lighting added, 1.
Link copied to clipboard
Get polygon stroke color (hex color code e.g.
Link copied to clipboard
Get polygon stroke opacity (0.0 = invisible, 1.
Link copied to clipboard
Get polygon stroke width
Link copied to clipboard
Get the polygon "zoom from" value, dictating from which zoom level the polygon should start being shown
Link copied to clipboard
Get the polygon "zoom to" value, dictating from which zoom level the polygon should stop being shown
Link copied to clipboard
Get wall color (hex color code e.g.
Link copied to clipboard
Get wall height in meters
Link copied to clipboard
get the lightness factor for the wall
Link copied to clipboard
Get wall "zoom from" value, dictating from which zoom level the wall should start being shown
Link copied to clipboard
Get wall "zoom to" value, dictating from which zoom level the wall should stop being shown
Link copied to clipboard
Get the "zoom from" value.
Link copied to clipboard
Get the "zoom to" value.
Link copied to clipboard
Get the visibility of a badge
Link copied to clipboard
Set extrusion visibility
Link copied to clipboard
Get icon visibility
Link copied to clipboard
Get label visibility
Link copied to clipboard
Get 2D model visibility
Link copied to clipboard
Get 3D model visibility
Link copied to clipboard
Get polygon visibility
Link copied to clipboard
open fun isValid(): Boolean
Validate the current state of MPDisplayRule values
Link copied to clipboard
Get general visibility value
Link copied to clipboard
Get wall visibility
Link copied to clipboard
open fun reset()
Resets the display rule to the original state.
Link copied to clipboard
open fun setBadgeFillColor(@Nullable badgeFillColor: String)
The fill color of the badge, given as a hex-color string in the form of #AARRGGBB or #RRGGBB
Link copied to clipboard
open fun setBadgePosition(@Nullable badgePosition: MPBadgePosition)
Set position of the badge relative to the icon, when an icon is visible
Link copied to clipboard
open fun setBadgeRadius(@Nullable badgeRadius: Integer)
Set the radius of the badge fill color.
Link copied to clipboard
open fun setBadgeScale(@Nullable badgeScale: Float)
The scale of the badge
Link copied to clipboard
open fun setBadgeStrokeColor(@Nullable badgeStrokeColor: String)
The stroke color of the badge, given as a hex-color string in the form of #AARRGGBB or #RRGGBB
Link copied to clipboard
open fun setBadgeStrokeWidth(@Nullable badgeStrokeWidth: Float)
The width of the stroke line around the badge in screen pixels (PX)
Link copied to clipboard
open fun setBadgeVisible(@Nullable visible: Boolean)
Set the badge visibility wether it should be visible or not
Link copied to clipboard
open fun setBadgeZoomFrom(@Nullable badgeZoomFrom: Float)
set badge "zoom from" value, dictating from which zoom level the badge should stop being shown
Link copied to clipboard
open fun setBadgeZoomTo(@Nullable badgeZoomTo: Float)
set badge "zoom to" value, dictating from which zoom level the badge should stop being shown
Link copied to clipboard
open fun setExtrusionColor(@ColorInt color: Int)
Set extrusion color
open fun setExtrusionColor(@Nullable color: String)
Set extrusion color (hex color code e.g.
Link copied to clipboard
open fun setExtrusionHeight(@Nullable height: Float)
Set extrusion height in meters
Link copied to clipboard
open fun setExtrusionLightnessFactor(@Nullable lightnessFactor: Float)
Set the extrusion Lightness Factor (-1.0 = Dark, 0.0 no lighting added, 1.
Link copied to clipboard
open fun setExtrusionVisible(@Nullable visible: Boolean)
Set extrusion visibility
Link copied to clipboard
open fun setExtrusionZoomFrom(@Nullable zoomFrom: Float)
Set extrusion "zoom from" value, dictating from which zoom level the extrusion should stop being shown
Link copied to clipboard
open fun setExtrusionZoomTo(@Nullable zoomTo: Float)
Set extrusion "zoom to" value, dictating from which zoom level the extrusion should stop being shown
Link copied to clipboard
open fun setIcon(@NonNull bitmap: Bitmap)
Set icon from bitmap
open fun setIcon(@NonNull drawable: Drawable)
open fun setIcon(@NonNull drawable: Drawable, @ColorInt tint: Int)
open fun setIcon(@NonNull drawable: Drawable, @NonNull tint: String)
Set icon from drawable
open fun setIcon(@DrawableRes resId: Int)
open fun setIcon(@DrawableRes resId: Int, @ColorInt tint: Int)
open fun setIcon(@DrawableRes resId: Int, @NonNull tint: String)
Set icon from resource ID
open fun setIcon(@NonNull iconUrl: String)
Set icon URL (will be used to download the icon asset)
Link copied to clipboard
open fun setIconPlacement(@Nullable iconPlacement: MPIconPlacement)
Set the placement of the icon, in relation to the location anchor
Link copied to clipboard
open fun setIconScale(@Nullable scale: Float)
Set scale of icon, default 1.
Link copied to clipboard
open fun setIconSize(width: Int, height: Int)
Set icon size (dp)
Link copied to clipboard
open fun setIconVisible(@Nullable visible: Boolean)
Set icon visibility
Link copied to clipboard
open fun setLabel(@Nullable label: String)
Set label text
Link copied to clipboard
open fun setLabelMaxWidth(@Nullable labelMaxWidth: Integer)
Set the max width for label text (in dp).
Link copied to clipboard
open fun setLabelStyleBearing(@Nullable bearing: Float)
Set the bearing of the label.
Link copied to clipboard
Set the blur value of the label halo (in pixels) Blur is the halo's fadeout distance
Link copied to clipboard
Set the color of the label halo (hex color code e.g.
Link copied to clipboard
Set the width of the label halo (in pixels)
Link copied to clipboard
Set the color of hte label characters
Set the color of the label text (hex color code e.g.
Link copied to clipboard
Set the opacity of the label text to a value between 0.0 and 1.
Link copied to clipboard
Set the size of the label characters (in pixels) (1 pixel is approximately 0.
Link copied to clipboard
Set the label type of the location, which will change the rendering of the label
Link copied to clipboard
open fun setLabelVisible(@Nullable visible: Boolean)
Set label visibility
Link copied to clipboard
open fun setLabelZoomFrom(@Nullable labelZoomFrom: Float)
Set the label "zoom from" value, dictating from which zoom level the label should start being shown
Link copied to clipboard
open fun setLabelZoomTo(@Nullable labelZoomTo: Float)
Set the label "zoom to" value, dictating from which zoom level the label should stop being shown
Link copied to clipboard
open fun setModel2DBearing(@Nullable bearing: Double)
Set 2D model bearing (rotation in degrees)
Link copied to clipboard
open fun setModel2DHeightMeters(@Nullable heightMeters: Double)
Set 2D model height in meters
Link copied to clipboard
open fun setModel2DModel(@Nullable model: String)
Set 2D model URL
Link copied to clipboard
open fun setModel2DVisible(@Nullable visible: Boolean)
Set 2D model visibility
Link copied to clipboard
open fun setModel2DWidthMeters(@Nullable widthMeters: Double)
Set 2D model width in meters
Link copied to clipboard
open fun setModel2DZoomFrom(@Nullable zoomFrom: Float)
Set 2D model "zoom from" value, dictating from which zoom level the model should start being shown
Link copied to clipboard
open fun setModel2DZoomTo(@Nullable zoomTo: Float)
Set 2D model "zoom to" value, dictating from which zoom level the model should stop being shown
Link copied to clipboard
open fun setModel3DModel(@NonNull model: String)
Set 3D model URL
Link copied to clipboard
open fun setModel3DRotationX(@Nullable rotationX: Float)
Set 3D model rotation around the X-axis in degrees
Link copied to clipboard
open fun setModel3DRotationY(@Nullable rotationY: Float)
Set 3D model rotation around the Y-axis in degrees
Link copied to clipboard
open fun setModel3DRotationZ(@Nullable rotationZ: Float)
Set 3D model rotation around the Z-axis in degrees
Link copied to clipboard
open fun setModel3DScale(@Nullable scale: Float)
Set 3D model scale as a multiple of its original size (1 is original size, 2 is double that, etc.
Link copied to clipboard
open fun setModel3DVisible(@Nullable visible: Boolean)
Set 3D model visibility
Link copied to clipboard
open fun setModel3DZoomFrom(@Nullable zoomFrom: Float)
Set 3D model "zoom from" value, dictating from which zoom level the 3D model should start being shown
Link copied to clipboard
open fun setModel3DZoomTo(@Nullable zoomTo: Float)
Set 3D model "zoom to" value, dictating from which zoom level the 3D model should stop being shown
Link copied to clipboard
open fun setPolygonFillColor(@ColorInt color: Int)
Set polygon fill color
Set polygon fill color (hex color code e.g.
Link copied to clipboard
open fun setPolygonFillOpacity(@Nullable opacity: Float)
Set polygon fill opacity (0.0 = invisible, 1.
Link copied to clipboard
open fun setPolygonLightnessFactor(@Nullable lightnessFactor: Float)
Set polygon Lightness Factor (-1.0 = Dark, 0.0 no lighting added, 1.
Link copied to clipboard
Set polygon stroke color
Set polygon stroke color (hex color code e.g.
Link copied to clipboard
Set polygon stroke opacity (0.0 = invisible, 1.
Link copied to clipboard
open fun setPolygonStrokeWidth(@Nullable strokeWidth: Float)
Set polygon stroke width
Link copied to clipboard
open fun setPolygonVisible(@Nullable visible: Boolean)
Set polygon visibility
Link copied to clipboard
open fun setPolygonZoomFrom(@Nullable zoomFrom: Float)
Set the polygon "zoom from" value, dictating from which zoom level the polygon should start being shown
Link copied to clipboard
open fun setPolygonZoomTo(@Nullable zoomTo: Float)
Set the polygon "zoom to" value, dictating from which zoom level the polygon should stop being shown
Link copied to clipboard
open fun setVisible(@Nullable visible: Boolean)
Set general visibility value
Link copied to clipboard
open fun setWallColor(@ColorInt color: Int)
Set wall color
open fun setWallColor(@Nullable color: String)
Set wall color (hex color code e.g.
Link copied to clipboard
open fun setWallHeight(@Nullable height: Float)
Set wall height in meters
Link copied to clipboard
open fun setWallLightnessFactor(@Nullable lightnessFactor: Float)
Set wall Lightness Factor (-1.0 = Dark, 0.0 no lighting added, 1.
Link copied to clipboard
open fun setWallVisible(@Nullable visible: Boolean)
Set wall visibility
Link copied to clipboard
open fun setWallZoomFrom(@Nullable zoomFrom: Float)
Set wall "zoom from" value, dictating from which zoom level the wall should start being shown
Link copied to clipboard
open fun setWallZoomTo(@Nullable zoomTo: Float)
Set wall "zoom to" value, dictating from which zoom level the wall should stop being shown
Link copied to clipboard
open fun setZoomFrom(@Nullable zoomFrom: Float)
Set the "zoom from" value.
Link copied to clipboard
open fun setZoomTo(@Nullable zoomTo: Float)
Set the "zoom to" value.