Thema: Routenplanung

Einzelnen Beitrag anzeigen

Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
43.166 Beiträge
 
Delphi 12 Athens
 
#6

Re: Routenplanung

  Alt 23. Nov 2009, 20:53
die URLs sollten vielleicht noch etwas codiert werden
http://www.scalabium.com/faq/dct0126.htm
http://www.delphipraxis.net/internal...ct.php?t=94711

Delphi-Quellcode:
function TGMapsLinker.GenerateLink: String;
begin
  Result := '';
  if (fToAdress = '') AND (fFromAdress = '') then
    exit;

  Result := fMainURL;

  //From
  Result := Result + '?saddr=' + HTTPEncode(fFromAdress);

  //To
  Result := Result + '&daddr=' + HTTPEncode(fToAdress);

  //Output Params
  case fOutputType of
    otJavaScript: Result := Result + '&output=js';
    otHTML: Result := Result + '&output=html';
  end;

  //Type of the Map
  case fMapType of
    mtMap: Result := Result + '&t=m';
    mtSatellite: Result := Result + '&t=k';
    mtHybrid: Result := Result + '&t=h';
    mtTerrain: Result := Result + '&t=p';
  end;

  //Zoom Set?
  if fZoomLevel > -1 then
    Result := Result + '&z='+ IntToStr(fZoomLevel);
end;
Garbage Collector ... Delphianer erzeugen keinen Müll, also brauchen sie auch keinen Müllsucher.
my Delphi wish list : BugReports/FeatureRequests
  Mit Zitat antworten Zitat