Reverse geocoding using Nominatim

Hi

I used the reverse geocoding with Here and Nominatim services.
With Here = no pb
However, with Nominatim I found a problem. I receive this message :

ExceptionMessage="'38,954278' n'est pas une valeur en virgule flottante correcte"
the code is :

Chaine := FPrincipal.FNCGeocoding.GetReverseGeocodingSync(Coor.ToRec);
The coordinate send are correct :
Coor.ToRec = (-8.9100609, 38.91495593, 0, 0, False, False, nil, '')

according to my tracing, the pb occurs at line 208 in this procedure :
procedure TTMSFNCGeocodingOpenStreetMapGeocoding.Parse(ARequest: TTMSFNCGeocodingRequest; ARequestResult: string);

  function StrToFloatDot(s: string): Double;
  begin
    if s <> '' then
      Result := StrToFloat(StringReplace(s, '.', ',', []))
    else
      Result := 0;
  end;

The correct syntax should be the opposite ? i.e :

  function StrToFloatDot(s: string): Double;
  begin
    if s <> '' then
      Result := StrToFloat(StringReplace(s, ',', '.', []))
    else
      Result := 0;
  end;

Hi Olivier,

Thank you for notifying.
This is actually an oversight as the function can safely be removed because the correct declaration is available in FMX.TMSFNCMapsCommonTypes.pas.
The update will also be available with the next release of TMS FNC Maps.

Thanks, and I agree to delete this function

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.