0

I'm using gmlib 1.1 with Delphi Xe2, Os is XP sp3, internet explorer is version 8. My problem is that I cannot programmatically add ground overlays at runtime, while all is ok if I do this at design time: on program starup the overlays are loaded and correctly shown. In specific, if I add any image at runtime I get an error 80020101. Doing some investigation, I peeked into the source code and I had to modify the TGMGroundOverlay. Add function like this, since it seems that I get the error when the overlay get updated while properties (latitude, longitude etc) are assigned:

function TGMGroundOverlay.Add(Url: string; SWLat, SWLng, NELat,
  NELng: Real): TGroundOverlay;
begin
  Result := TGroundOverlay(inherited Add);
  result.FVisible:=false;//<---added this line
  Result.Url := Url;
  Result.Bounds.SW.Lat := SWLat;
  Result.Bounds.SW.Lng := SWLng;
  Result.Bounds.NE.Lat := NELat;
  Result.Bounds.NE.Lng := NELng;
end;

Then I set the overlay active once added. By the way, I was getting the same error also with the gmlib mega-demo example. Is this workaround necessary? Was it my fault in adding new overlays?

PowerStat
  • 3,757
  • 8
  • 32
  • 57
Drugoi_mir
  • 41
  • 3
  • This is a bug of GMLib. I have modify and fixed it and now you can download a new release from CSV repository from [Google Code](http://code.google.com/p/gmlibrary/source/checkout). Thanks! – cadetill Jan 04 '14 at 10:34
  • Thanks Xavier, keep up this good job! – Drugoi_mir Jan 07 '14 at 22:59

0 Answers0