I am doing something wrong or something is not right with GeocodingRequestResult...

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)

Dear Mr. Cardenas,

We have detected an issue in parsing the JSON returning from Google related to the postal code. We have applied a fix, the next version will address this.

About the second problem. The request is an intersection. In the request result, the route parameter is missing when comparing this with other requests, therefore the street is empty. May I ask you what exactly you want to have returned in this case?

{
   "results" : [
      {
         "address_components" : [
            {
               "long_name" : "Southwest 248th Street & Southwest 137th Avenue",
               "short_name" : "SW 248th St & SW 137th Ave",
               "types" : [ "intersection" ]
            },
            {
               "long_name" : "Princeton",
               "short_name" : "Princeton",
               "types" : [ "locality", "political" ]
            },
            {
               "long_name" : "Miami-Dade County",
               "short_name" : "Miami-Dade County",
               "types" : [ "administrative_area_level_2", "political" ]
            },
            {
               "long_name" : "Florida",
               "short_name" : "FL",
               "types" : [ "administrative_area_level_1", "political" ]
            },
            {
               "long_name" : "United States",
               "short_name" : "US",
               "types" : [ "country", "political" ]
            },
            {
               "long_name" : "33032",
               "short_name" : "33032",
               "types" : [ "postal_code" ]
            }
         ],
         "formatted_address" : "SW 248th St & SW 137th Ave, Princeton, FL 33032, USA",
         "geometry" : {
            "location" : {
               "lat" : 25.5364692,
               "lng" : -80.41277669999999
            },
            "location_type" : "GEOMETRIC_CENTER",
            "viewport" : {
               "northeast" : {
                  "lat" : 25.5378181802915,
                  "lng" : -80.41142771970848
               },
               "southwest" : {
                  "lat" : 25.5351202197085,
                  "lng" : -80.41412568029151
               }
            }
         },
         "place_id" : "EjRTVyAyNDh0aCBTdCAmIFNXIDEzN3RoIEF2ZSwgUHJpbmNldG9uLCBGTCAzMzAzMiwgVVNBImYiZAoUChIJZfw62ird2YgRxS6L9LHtpDgSFAoSCWX8Otoq3dmIEcUui_Sx7aQ4GhQKEgnpTmotM8PZiBFBWYsEyaC8mxoUChIJ3UZ1tTXC2YgRTq0NLOj7YlAiCg1UjjgPFen7EdA",
         "types" : [ "intersection" ]
      }
   ],
   "status" : "OK"
}

Hi Pieter,

In this case we would like please to have returned the "short_name" : "SW 248th St & SW 137th Ave”. ``

Thank you very much and Merry Christmas.

Hi Rafael,

The Intersection field has now been added and will become available with the next TMS FNC Maps release.