Das sieht ungefähr so aus (Auszug):
$loc_home = 'Start-Straße-PLZ-Ort-URL-Encoded';
$loc_dest = 'Ziel-Straße-PLZ-Ort-URL-Encoded';
$iframe_src = 'https://www.google.com/maps/embed/v1/directions?';
if($direction == 0) {
$iframe_src = $iframe_src.'origin='.$loc_home.'&destination='.$loc_dest.'&key='.$api_key;
}
else {
$iframe_src = $iframe_src.'origin='.$loc_dest.'&destination='.$loc_home.'&key='.$api_key;
}
$iframe_url = '<iframe width=\''.$iframe_width.'\' height=\''.$iframe_height.'\' frameborder=\'0\' style=\'border:0\' src=\''.$iframe_src.'\' allowfullscreen></iframe>';
Bin mir gerade nicht 100% sicher, aber die werden auch angezeigt. Aber im Moment habe ich keinen Stau auf meiner Strecke ![]()
Also ich nutze sie mit Key (siehe Aufruf)!
CIAo Pitti