Hi, with the use of TWebGMapsReverseGeocoding it was possible to ReverseGeocode coordinates to a TWebGMapsAddress with detail fields for Country, Zip, City, Street etc.
Is the same functionality also available with TTMSFNCGeocoding components?
Hi, with the use of TWebGMapsReverseGeocoding it was possible to ReverseGeocode coordinates to a TWebGMapsAddress with detail fields for Country, Zip, City, Street etc.
Is the same functionality also available with TTMSFNCGeocoding components?
Hi,
Yes address details are returned in the OnGetReverseGeocoding event after calling GetReverseGeocoding.
Example:
procedure TForm1.TMSFNCGeocoding1GetReverseGeocoding(Sender: TObject;
const ARequest: TTMSFNCGeocodingRequest;
const ARequestResult: TTMSFNCCloudBaseRequestResult);
begin
TTMSFNCUtils.Log(Arequest.Items[0].Address);
end;
I need the different address fields like country, zip, city, street etc as seperate fields?
Separate address fields are available: Address, City, District, Country, CountryCode, Province, ProvinceCode, Region, RegionCode, Street, StreetName, StreetNumber, PostalCode, Intersection.
Field availability depends on the geocoding service and the specific coordinate, some fields may be empty.
I must have missed that because I looked into the GetReverseGeocodingSync function:
function TTMSFNCCustomGeocoding.GetReverseGeocodingSync(
ACoordinate: TTMSFNCMapsCoordinateRec; ALocale: string;
AMode: TTMSFNCMapsLocaleMode): string;
Is it possible that you extend your "Sync" method for returning an record / structure for all address details?
Thank you for your suggestion we'll look into extending the GetReverseGeocodingSync function to return address details in a future version of TMS FNC Maps.