Jump to content

Sealevel in uniMAps possible?


erich.wanker

Recommended Posts

hi ..

to calculate the lenght of a line - i should calculate allso with the altitude .. see as example: https://www.mapcoordinates.net/en

is the altitude-value in future possible?

At this time i become Lat and Lng Values 

procedure UniMap1MapClick(Sender: TObject; const Lat, Lng: Double; const Zoom, X, Y, Id: Integer);

 

ThanX

Erich

Link to comment
Share on other sites

You can't get altitude onClick event. We are using Leaflet.js.

Leaflet is a map display library, not a data API, not an elevation raster query library.

For this, you will have to rely on some kind of elevation dataset.

Whether to use a service like that or whether you should have your own elevation dataset is up to you. In any case, Leaflet does not provide a favorite elevation query service by default (contrary to what Google Maps does, as it relies on Google's elevation datasets).

  • Like 1
Link to comment
Share on other sites

ThanX for the perfect information :-)

 

i just found  the Google elevation dataset api thing

and try to play with the google JSON - if i send Longitude and Latitude 

https://developers.google.com/maps/documentation/elevation/intro


 

function Tf_show_myMap.SendAnfrage(linkadresse:string):string;
const
  cUSER_AGENT = 'Mozilla/4.0 (MSIE 6.0; Windows NT 5.1)';
var
 httpResponse: string;
 Stream: TStringStream;
 URL, telParams:string;
 HTTP:TidHTTP;
begin
  URL:=linkadresse;
  Stream := TStringStream.Create;
  HTTP:=TIdHTTP.Create(nil);
  HTTP.ReadTimeout := 10000;{ IdTimeoutInfinite; }
  HTTP.ConnectTimeout := 10000;
  try
    HTTP.Request.UserAgent := cUSER_AGENT;
    try
      HTTP.Get(URL, Stream);
      result:= Stream.DataString;
    except
      result:= 'Communication Error!';
    end;
  finally
    Stream.Free;
    HTTP.Free;
  end;
end;

 

procedure Tf_show_myMap.UniButton20Click(Sender: TObject);
begin
showmessage(SendAnfrage('http://maps.googleapis.com/maps/api/elevation/json?locations=39.7391536,-104.9847034  [and your API key] '));

end;

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...