ensureApiInitialized method
Returns the API instance for mapId, creating it if it doesn't already
exist.
Implementation
@visibleForTesting
MapsApi ensureApiInitialized(int mapId) {
MapsApi? api = _hostMaps[mapId];
if (api == null) {
api = _apiProvider(mapId);
_hostMaps[mapId] ??= api;
}
return api;
}