keyByMarkerId function

Map<MarkerId, Marker> keyByMarkerId(
  1. Iterable<Marker> markers
)

Converts an Iterable of Markers in a Map of MarkerId -> Marker.

Implementation

Map<MarkerId, Marker> keyByMarkerId(Iterable<Marker> markers) {
  return keyByMapsObjectId<Marker>(markers).cast<MarkerId, Marker>();
}