Hello, attached to this topic a Test project where two problems that I have had are manifested.
The first is trying to get the PostalCode by reading the Request from TTMSFNCGeocodingRequest, the resulting value is not correct, for example for this address 550 NW 51st Ave, Miami, FL 33126, USA. Obviously, depending on the address, the PostalCode = 33126, however the value returned in the callback is not correct:
G.GetGeocoding(vAddressTo,
procedure(const ARequest: TTMSFNCGeocodingRequest; const ARequestResult: TTMSFNCCloudBaseRequestResult)
begin
if (ARequestResult.Success) and (ARequest.Items.Count > 0) then
begin
Memo1.Lines.Add('Address: ' + ARequest.Items[0].Address);
Memo1.Lines.Add('Street: ' + ARequest.Items[0].Street);
Memo1.Lines.Add('City: ' + ARequest.Items[0].City);
Memo1.Lines.Add('PostalCode: ' + ARequest.Items[0].PostalCode);
Memo1.Lines.Add('Region: ' + ARequest.Items[0].Region);
Memo1.Lines.Add('CountryCode: ' + ARequest.Items[0].CountryCode);
end
end
);
The second problem, precisely here, is related when it comes to an address by street-avenue interceptions, example: SW 248th St & SW 137th Ave, in this case, the value returned by ARequest.Items [0]. Street is string empty.
The service I am using is gsGoogle
Is it a TTMSFNCGeocodingRequest error or am I doing something wrong?
To reiterate my greetings;
PD: To test the Test project it is necessary to specify a valid APIKey for TTMSFNCRouteCalculator and TTMSFNCGeocodingProjectTest.zip (25.6 KB)
ProjectTest.zip (25.6 KB)