MPDisplayRule

open class MPDisplayRule : IDisplayRule

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
open fun MPDisplayRule(    @NonNull id: String,     @NonNull parent: WeakReference<MPDisplayRule>,     @NonNull options: MPDisplayRuleOptions)
Create an empty MPDisplayRule.
Link copied to clipboard
open fun MPDisplayRule(@NonNull id: String, @NonNull options: MPDisplayRuleOptions)
Create an empty MPDisplayRule.
Link copied to clipboard
open fun MPDisplayRule(@NonNull id: String, @NonNull parent: WeakReference<MPDisplayRule>)
Create an empty MPDisplayRule.
Link copied to clipboard
open fun MPDisplayRule(@NonNull id: String)
Create an empty MPDisplayRule.

Functions

Link copied to clipboard
open fun applyOptions(options: MPDisplayRuleOptions)
Bulk update this Rule with the fields set in the MPDisplayRuleOptions
Link copied to clipboard
open fun getExtrusionColor(): String
Get extrusion color (hex color code e.g.
Link copied to clipboard
open fun getExtrusionHeight(): Float
Get extrusion height in meters
Link copied to clipboard
open fun getExtrusionZoomFrom(): Float
Get extrusion "zoom from" value, dictating from which zoom level the extrusion should stop being shown
Link copied to clipboard
open fun getExtrusionZoomTo(): Float
Get extrusion "zoom to" value, dictating from which zoom level the extrusion should stop being shown
Link copied to clipboard
open fun getIconAsync(@NonNull listener: OnResultAndDataReadyListener<Bitmap>)
Get the display rule's icon asynchronously
Link copied to clipboard
open fun getIconSize(): MPIconSize
Get icon size
Link copied to clipboard
open fun getIconUrl(): String
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
open fun getLabel(): String
Get label text
Link copied to clipboard
open fun getLabelMaxWidth(): Integer
Get the max width for label text (in dp).
Link copied to clipboard
open fun getLabelZoomFrom(): Float
Get the label "zoom from" value, dictating from which zoom level the label should start being shown
Link copied to clipboard
open fun getLabelZoomTo(): Float
Get the label "zoom to" value, dictating from which zoom level the label should stop being shown
Link copied to clipboard
open fun getModel2DBearing(): Double
Get 2D model bearing (rotation in degrees)
Link copied to clipboard
open fun getModel2DHeightMeters(): Double
Get 2D model height in meters
Link copied to clipboard
open fun getModel2DModel(): String
Get 2D model URL
Link copied to clipboard
open fun getModel2DWidthMeters(): Double
Get 2D model width in meters
Link copied to clipboard
open fun getModel2DZoomFrom(): Float
Get 2D model "zoom from" value, dictating from which zoom level the model should start being shown
Link copied to clipboard
open fun getModel2DZoomTo(): Float
Get 2D model "zoom to" value, dictating from which zoom level the model should stop being shown
Link copied to clipboard
open fun getPolygonFillColor(): String
Get polygon fill color (hex color code e.g.
Link copied to clipboard
open fun getPolygonFillOpacity(): Float
Get polygon fill opacity (0.0 = invisible, 1.
Link copied to clipboard
open fun getPolygonStrokeColor(): String
Get polygon stroke color (hex color code e.g.
Link copied to clipboard
open fun getPolygonStrokeOpacity(): Float
Get polygon stroke opacity (0.0 = invisible, 1.
Link copied to clipboard
open fun getPolygonStrokeWidth(): Float
Get polygon stroke width
Link copied to clipboard
open fun getPolygonZoomFrom(): Float
Get the polygon "zoom from" value, dictating from which zoom level the polygon should start being shown
Link copied to clipboard
open fun getPolygonZoomTo(): Float
Get the polygon "zoom to" value, dictating from which zoom level the polygon should stop being shown
Link copied to clipboard
open fun getWallColor(): String
Get wall color (hex color code e.g.
Link copied to clipboard
open fun getWallHeight(): Float
Get wall height in meters
Link copied to clipboard
open fun getWallZoomFrom(): Float
Get wall "zoom from" value, dictating from which zoom level the wall should start being shown
Link copied to clipboard
open fun getWallZoomTo(): Float
Get wall "zoom to" value, dictating from which zoom level the wall should stop being shown
Link copied to clipboard
open fun getZoomFrom(): Float
Get the "zoom from" value.
Link copied to clipboard
open fun getZoomTo(): Float
Get the "zoom to" value.
Link copied to clipboard
open fun isExtrusionVisible(): Boolean
Set extrusion visibility
Link copied to clipboard
open fun isIconVisible(): Boolean
Get icon visibility
Link copied to clipboard
open fun isLabelVisible(): Boolean
Get label visibility
Link copied to clipboard
open fun isModel2DVisible(): Boolean
Get 2D model visibility
Link copied to clipboard
open fun isPolygonVisible(): Boolean
Get polygon visibility
Link copied to clipboard
open fun isValid(): Boolean
Validate the current state of MPDisplayRule values
Link copied to clipboard
open fun isVisible(): Boolean
Get general visibility value
Link copied to clipboard
open fun isWallVisible(): Boolean
Get wall visiblity
Link copied to clipboard
open fun reset()
Resets the display rule to the original state.
Link copied to clipboard
open fun setExtrusionColor(@ColorInt color: Int)
Set extrusion color
open fun setExtrusionColor(color: String)
Set extrusion color (hex color code e.g.
Link copied to clipboard
open fun setExtrusionHeight(height: Float)
Set extrusion height in meters
Link copied to clipboard
open fun setExtrusionVisible(visible: Boolean)
Set extrusion visibility
Link copied to clipboard
open fun setExtrusionZoomFrom(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(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, 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, 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 setIconSize(width: Int, height: Int)
Set icon size (dp)
Link copied to clipboard
open fun setIconVisible(visible: Boolean)
Set icon visibility
Link copied to clipboard
open fun setLabel(label: String)
Set label text
Link copied to clipboard
open fun setLabelMaxWidth(labelMaxWidth: Integer)
Set the max width for label text (in dp).
Link copied to clipboard
open fun setLabelVisible(visible: Boolean)
Set label visibility
Link copied to clipboard
open fun setLabelZoomFrom(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(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(bearing: Double)
Set 2D model bearing (rotation in degrees)
Link copied to clipboard
open fun setModel2DHeightMeters(heightMeters: Double)
Set 2D model height in meters
Link copied to clipboard
open fun setModel2DVisible(visible: Boolean)
Set 2D model visibility
Link copied to clipboard
open fun setModel2DWidthMeters(widthMeters: Double)
Set 2D model width in meters
Link copied to clipboard
open fun setModel2DZoomFrom(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(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 setPolygonFillColor(@ColorInt color: Int)
Set polygon fill color
open fun setPolygonFillColor(color: String)
Set polygon fill color (hex color code e.g.
Link copied to clipboard
open fun setPolygonFillOpacity(opacity: Float)
Set polygon fill opacity (0.0 = invisible, 1.
Link copied to clipboard
open fun setPolygonStrokeColor(@ColorInt color: Int)
Set polygon stroke color
open fun setPolygonStrokeColor(color: String)
Set polygon stroke color (hex color code e.g.
Link copied to clipboard
open fun setPolygonStrokeOpacity(opacity: Float)
Set polygon stroke opacity (0.0 = invisible, 1.
Link copied to clipboard
open fun setPolygonStrokeWidth(strokeWidth: Float)
Set polygon stroke width
Link copied to clipboard
open fun setPolygonVisible(visible: Boolean)
Set polygon visibility
Link copied to clipboard
open fun setPolygonZoomFrom(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(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(visible: Boolean)
Set general visibility value
Link copied to clipboard
open fun setWallColor(@ColorInt color: Int)
Set wall color
open fun setWallColor(color: String)
Set wall color (hex color code e.g.
Link copied to clipboard
open fun setWallHeight(height: Float)
Set wall height in meters
Link copied to clipboard
open fun setWallVisible(visible: Boolean)
Set wall visibility
Link copied to clipboard
open fun setWallZoomFrom(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(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(zoomFrom: Float)
Set the "zoom from" value.
Link copied to clipboard
open fun setZoomTo(zoomTo: Float)
Set the "zoom to" value.