Highlight and Select
This documentation refers to the introduced concept of select and highlight that was released with SDK 4.3.0.
Last updated
This documentation refers to the introduced concept of select and highlight that was released with SDK 4.3.0.
Last updated
The MapsIndoors iOS SDK supports Select and Highlight Display Rules and they can be retrieved and edited through MPMapsIndoors.shared
.
The new Highlight Display Rule has a collection of new properties that can be used to change the style of the Highlight badge. You can see all current Display Rule properties in the reference documentation.
The selection Display Rule is for changing the appearance of single selected Location, for example when the user clicks on it. To select a Location programmatically, call the method MPMapControl.select(location:behavior)
You can easily change the icon to an image from your app Asset Catalogue. In this example it is assumed that you have an image in the project Asset Catalogue named selectionIcon
:
Before the release of 4.3.0 the MapsIndoors SDK already had a visual implementation of selection with a Display Rule. That Display Rule can also be changed like the newly introduced Selection Display Rule. If you want to retain the old selection rendering, it can be toggled through the Solution Config on the SDK.
Note that the newSelection
setting lives on the Solution, so with any subsequent load of MapsIndoors it will be necessary to set the value to false
again, as it defaults to true
.
This Selection mechanism is deprecated and will be removed in the next major version of the SDK.
Highlight is for changing the appearance for a collection of MPLocation
s, for example to highlight all the restrooms in an office building.
The state Display Rules control how Locations in different states are displayed on the map. For example, you can change the icon scale of a Location to highlight it is part of a search result. The state Display Rules give access to the same properties as the regular Display Rules, which can be used to control the appearance of Locations.