I want to integrate google maps into my app without using the angular2-google-maps component. I tried following the getting started tutorial
When I put the two scripts from the tutorial in the index.html file and create a maps component, which basically only links to an html file with the
<div id="map"></div> tag in it, I get the following error:
TypeError: Cannot read property 'offsetWidth' of null.
This is probably due to the script being executed before the actual div is loaded. How can I make these scripts execute after all the elements have loaded? Adding the scripts to the html part of my maps component doesn't seem to work.