GotoAddress method

When, if ever, is this method able to work? I'm unable to make it work at any point, resulting in the 80020101 error

Hi,


I'm assuming you are referring to the method associated with the "Go To Address" button in the WebGMapsMainDemo application?
I have not been able to reproduce an issue with this.
Can you please provide further details about how the problem can be reproduced. Which address are you using and which version of Delphi are you using?

I'm referring to the GotoAddress method on the TTMSFMXWebGMaps class. It can be reproduced simply by having the component on a form, have a button, and in the click event, call GotoAddress with any address.

I'm using Delphi 10 Seattle and the latest WebGMaps.

Hi, 


We have investigated this here and have fixed the issue.
The next version will include this fix.

Kind Regards, 
Pieter

Is this something that could be resolved by our modifying the source, before the next release?

Hi, 


You need to replace the contents of the GoToAddress with:

procedure TTMSFMXWebGMaps.GoToAddress(Address: String);
var
  geo: TTMSFMXWebGMapsGeocoding;
begin
  geo := TTMSFMXWebGMapsGeocoding.Create(Self);
  geo.Address := Address;
  if geo.LaunchGeocoding = erOk then
    MapPanTo(geo.ResultLatitude, geo.ResultLongitude);
  geo.Free;
end;

Or use this non-visual component separately.

Kind Regards,
Pieter


OK; not what I was expecting. Is there no way to simply pass an address, like what happens with the Google Maps website?

A little more research and it seems that is not the case. The main issue is that addresses can be incomplete or missing important information. A failed geolocate can be re-run with modified information but that means using more of the quota.

I'll check out geocoding a bit more, thanks.

The FireMonkey version of the WebGMaps originates from VCL which doesn't have this method, so there you still need to go through the non-visual component to go to a specific address. In FMX we have simply provided a helper method that wraps this code.


Kind Regards, 
Pieter