JavaScript errors: why? and how to handle?

Why am I getting JavaScript error popus such as "'createmapmarker' is undefined"(also "alllabels", "map", "createmappolyline" and more)?

I am guessing that there was a communciation problwm with GoogleMaps (?).

I don't want my users seeing this and not knowing what is happening. Can I suppress it? Can I recover from it? How is it recommended to be handled?

Hi,


This usually means the WebGMaps control is executing JavaScript calls before the script has been fully loaded.

You can disable error messages like this: TwebGmaps1.WebBrowser.Silent
:= True;
 
Can you please explain exactly when the error messages occur?
If you can provide a ready to run sample project I can further investigate this issue.

Thank you so much for the very quick and helpful response!

Although
I thought that I was waiting until the OnDownloadFinish handler was
called before updating the map, I found one code path where I
accidentally tried to add a marker while the map was still Launching.