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?