activateHighlightOverlayItems method
- List<
OverlayItem> overlayItems, { - HighlightRenderSettings? renderSettings,
- int highlightId = 0,
Activates highlighting for a collection of overlay items with custom rendering.
Visually emphasizes the specified overlay items on the map using customizable rendering settings. This is useful for highlighting user-added content, selected items, or interactive elements.
Each highlight collection is identified by a unique ID. If a collection with the specified ID already exists, it will be replaced. Multiple collections can coexist and are rendered in ascending order by highlight ID.
Parameters
overlayItems: The list of overlay items to highlight on the maprenderSettings: Customizes the visual appearance of highlighted overlay items. Ifnull, uses default rendering. Defaults tonullhighlightId: Unique identifier for this highlight collection. If a collection with this ID exists, it will be replaced. Defaults to0
See also:
- activateHighlight - Activate highlighting for landmarks
- deactivateHighlight - Remove highlighting from a collection
- HighlightRenderSettings - Customize highlight appearance
Implementation
void activateHighlightOverlayItems(
final List<OverlayItem> overlayItems, {
final HighlightRenderSettings? renderSettings,
final int highlightId = 0,
}) {
final OverlayItemList landmarkList = OverlayItemList.fromList(overlayItems);
objectMethod(
_pointerId,
'MapView',
'activateHighlightOverlayItems',
args: <String, dynamic>{
'landmarks': landmarkList.pointerId,
if (renderSettings != null) 'renderSettings': renderSettings.toJson(),
'highlightId': highlightId,
},
);
}