Highlight and Select
This documentation refers to the introduced concept of select and highlight that was released with SDK 4.3.0.
How to change the appearance of different states
The state Display Rules controls how Locations are displayed on the map in different states. For example, you can change the icon scale of a Location when it is hovered over or highlight a search result. The state Display Rules gives access to the same properties as the regular Display Rules, which can be used to control the appearance of Locations.
The iOS SDK supports Select and Highlight Display Rules these can be received and edited through MapsIndoors
.
Example
Highlight
Highlight is for changing the appearance for a collection of MPLocation
's, for example to highlight where the restrooms are located in an office building.
Highlight all Restrooms
Clear the highlight
Selection
The selection Display Rule is for changing the appearance of a single Location, for example when the user clicks on it. To select a Location manually, call the method MPMapControl.select(location:behavior)
Clear current selection
Previous selection
Before the release of 4.3.0 the iOS SDK already had a visual implementation of selection with a Display Rule. That can also be changed like the newly introduced Selection Display Rules Type. If you want to retain the old selection rendering, it can be toggled through the Solution Config on the SDK.
Example
Note that this is based 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
.
Last updated