fromLatLngToDivPixel Script Error - Delphi

I am getting the following script error:


"Unable to get property 'fromLatLngToDivPixel' of undefined or null reference"

This occasionally happens when the application is first loaded up. 

Silencing script errors does not prevent this from occurring.

I am using Delphi 2007 and running version 2.0.1.0 of the WebGMap component.


Hi,


I'm assuming you are adding Markers before the map has finished loading.

Can you please try to only add Markers after the OnDownloadFinish event has been fired?
This event is triggered when the map display is fully downloaded.

I am using the OnDownloadFinish event and markers are only being added once a flag is set in this function.


I can reproduce the error after I close my application, clear cache and history from Internet explorer and then restart the application.  When the map first loads the code breaks in the TWebGMaps.ExecJScript function.  The script value being sent that is failing is:

'if (0<alllabels.length) { alllabels[0].show(); alllabels[0].setText("123 MAIN STREET"); }'

It also appears that scripts are only being run when bLaunchFinish is set to true.

The maps will work fine after the initial error and will only occur again if I clear the cache and history from IE.


I have not been able to reproduce this issue.
Can you please provide a ready to run sample project that demonstrates the issue so I can further investigate this?

Samples can be sent to: mailto:help@tmssoftware.com

Just sent a sample project.  Thanks.