Thanks for the reply and sorry for my delay … I’ve setup a GitHub repository and cleaned up the code which I am hoping may help.
The plan is to hit a toolbar button, move to a new screen, the map loads, the user can drop a pin and the location is stored.
I’ve used Monaca and pushed some files to GitHub.
index.html has a toolbar. If you hit the left button you get another button and pressing that loads the map.
If you hit the right button the map doesn’t load.
Now, I’ve included an index-loads.html file so that you can see that the code from the right hand side works if it is run as part of the index.html file but not as part of a loading page. Given that adding the interim button works I am assuming that the map is trying to load before the page has been pushed onto the navigator stack … but I can’t figure out how to wait until the page has loaded (unless I’ve missed something) before loading the map …
Thanks for your help.