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
Example
// Changing the visibility of a polygon for selection
if let displayRule = MPMapsIndoors.shared.displayRuleFor(displayRuleType: .selection) {
displayRule.polygonVisible = true
}
// Changing the visibility of a label for highlights
if let displayRule = MPMapsIndoors.shared.displayRuleFor(displayRuleType: .highlight) {
displayRule.labelVisible = false
}Highlight
Highlight all Restrooms
// Create a filter to only receive locations with the category Toilet
let filter = MPFilter()
filter.categories = ["Toilet"]
// Query locations with the created filter
let locations = await MPMapsIndoors.shared.locationsWith(query: nil, filter: filter)
// Highlighting all current toilets, with the default MPHighlightBehavior.
// The MPHighlightBehavior can be used to customize the camera and map behavior,
// like fitting the view to show all highlighted locations.
mapControl?.setHighlight(locations: locations, behavior: .default)
Clear the highlight
Styling the Highlight Badge
Example: Change the color of the Highlight Badge
Example: Hide the Highlight Badge
Selection

Clear current Selection
Styling the Selection Marker

Deprecated Selection Highlight
Example
Last updated
Was this helpful?