When the page is first loaded, google maps api is not loaded.
To verify this, click on
"Show map"
Now click on
"Load maps api"
. An alert will appear notifying that maps js api is now loaded.
Now click on
"Show map"
again. Since js api has been loaded, map will be displayed this time.