selectedOverlay
The selected overlay on the map.
Declaration
get selectedOverlay(): Overlay | null;
set selectedOverlay(overlay: Overlay | null);Discussion
To deselect any selected overlay, set this property to null.
To select an overlay that’s already part of the map, set this property to the desired overlay.
When MapKit JS removes the selected overlay from the map (as an effect of removeOverlay(overlay), removeOverlays(overlays), or setting a new set of overlays with the overlays property), MapKit JS deselects the overlay before removing it.