reading through the code, it looks like setOptions
calls bootstrap
which adds a script element to the page, which naturally loads async
so then if you immediately call importLibrary
it will fail because window.google.maps
is not available yet
it seems like importLibrary
needs to know if setOptions
has been called and if there is a script loading, so that it can await that script onload event.