0

I get this error "Could not complete the operation due to error 80020101." at random times when displaying a map with a marker on it. I use Delphi 2007 and GMLib [1.2.0 Final].

I have read up on the issue and some suggestions was that the problem is due to commenting or bad syntax in javascript code, and it was suggested that i take out all the commenting and check for errors in the javascript code. This i did, i recompiled and reinstalled GMLib after modifying the map.html file. I stripped it of all commenting and parsed it through ie for faults but found none, as expected. But the problem still occurs. Here is a sample of my code to show the map and add the marker :

Var
  newmarker : TMarker;
begin
  newmarker :=  GMMarker1.Add();
  newmarker.Position.Lat := MarkersToPaint[i].Latitude;
  newmarker.Position.Lng := MarkersToPaint[i].Longitude;
  newmarker.Visible := True;
  newmarker.Title := MarkersToPaint[i].Title;

  GMMap1.RequiredProp.Center.Lat := midlat;
  GMMap1.RequiredProp.Center.Lng := midlong;
  GMMap1.RequiredProp.Zoom := 18;

  GMMarker1.ShowElements;

  GMMap1.Active := True;

Any help in this matter will be greatly appreciated.

Arioch 'The
  • 15,799
  • 35
  • 62
Pierrie
  • 3
  • 3
  • http://stackoverflow.com/questions/10903989/ http://stackoverflow.com/questions/4918969 Problematic JScript or VBScript may be in some file that GMLib downloads from internet rather than your file. You would need to investigate what actually does Microsoft Internet Explorer do to render the map. – Arioch 'The Nov 11 '13 at 16:02
  • Update IE and try if the problem persist – cadetill Nov 11 '13 at 19:45
  • I have got IE version 9, i will now update to 10 and report back, thanks for the advice. – Pierrie Nov 12 '13 at 07:27
  • I have upgraded to version 10 of IE and the problem still persists, i will try a few more options and report back. – Pierrie Nov 12 '13 at 09:33
  • you seem to use MSIE embedded into your application. For compatibility when embedded MSIE works in MSIE-6 mode. To switch it to modern mode you should have special strict-HTML header in the HTML page and call some method over COM-interface of MSIE. Maybe GMLib already did that, but maybe not... http://stackoverflow.com/questions/4097593/ http://stackoverflow.com/questions/6534614 – Arioch 'The Nov 12 '13 at 09:54

1 Answers1

0

I found the problem code part, i update the map with the new location of the marker and in my effort to keep the marker always visible i call the following code on a timer :

GMMap1.RequiredProp.Center.Lat := MarkersToPaint[i].Latitude; --problem code
GMMap1.RequiredProp.Center.Lng := MarkersToPaint[i].Longitude; --problem code
GMMap1.PanTo(MarkersToPaint[i].Latitude,MarkersToPaint[i].Longitude);

after removing the problem code, the errors stopped. I am not sure what causes them but this is a workaround to any one experiencing this error under these circumstances.

Thanks for the help.

Pierrie
  • 3
  • 3