GetGeocoding in C++

In a TMS FNC Maps VCL demo I found Delphi code like this ...

procedure TSearchCoordForm.SearchButtonClick(Sender: TObject);
begin
  GeoCoding.GetGeocoding( _OrtsnameEdit.Text ,
    procedure( const ARequest: TTMSFNCGeocodingRequest; const ARequestResult: TTMSFNCCloudBaseRequestResult )
      begin
        ...
      end );
end;

What is the same code in C++?

Best regards, Dirk

At this time samples are only provided in Delphi code.
Unfortunately we are unable to provide C++ samples.

It is recommended to use the OnGetGeocoding event instead for C++.

Example:

procedure TForm1.Button1Click(Sender: TObject);
begin
  TMSFNCGeocoding1.GetGeocoding(Address.Text);
end;

procedure TForm1.TMSFNCGeocoding1GetGeocoding(Sender: TObject;
  const ARequest: TTMSFNCGeocodingRequest;
  const ARequestResult: TTMSFNCCloudBaseRequestResult);
begin
  ...
end;

Hi Bart,

thank you for your answer. In a short test it worked like that. It is much easier than the Delphi code in the demo.

Another question about this ...

You used OnGetGeocoding and there is another called OnGetGeocodingResult.
What is the difference between both functions?

Regards, Dirk

Hi Dirk,

There's actually not much difference between the two:

  • OnGetGeocoding is triggered when GetGeocoding is used and will return both the result of the request and request information itself.
  • OnGetGeocodingResult is triggered when GetGeocodingResult is used and will only return the result of the request.

You can use the one you prefer as the request result will be the same.