diff options
author | Mathias Mayrhofer <mtmayr@mtmayr.com> | 2020-02-24 10:24:30 +0100 |
---|---|---|
committer | Mathias Mayrhofer <mtmayr@mtmayr.com> | 2020-02-24 10:24:30 +0100 |
commit | b69e2e8510e91c876a9e3f9d06a3304078de9055 (patch) | |
tree | 6d46f733fceadcebc3637db484a3ad20f3d9033c | |
parent | 9b2b226a46acfd6d19ecab1800ff892e62371064 (diff) |
Links verbessert
-rw-r--r-- | kml/data.php | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/kml/data.php b/kml/data.php index f5360d0..c301f33 100644 --- a/kml/data.php +++ b/kml/data.php @@ -430,7 +430,7 @@ foreach ($locations as $location) { ?> </Folder> <Folder> - <name>Links</name> + <name>Bodenlinks</name> <visibility>1</visibility> <?php foreach ($links as $link) { @@ -453,5 +453,28 @@ foreach ($links as $link) { } ?> </Folder> + <Folder> + <name>Linienlinks</name> + <visibility>0</visibility> +<?php +foreach ($links as $link) { + $data1 = $locations[$locids[$link->ipfromLoc]]; + $data2 = $locations[$locids[$link->iptoLoc]]; + //printf("\t" . '<link fromid="%s" from="%s" latfrom="%s" lngfrom="%s" toid="%s" to="%s" latto="%s" lngto="%s" value="%s" channel="%s" defaultroute="%s" frequency="%s" dnsfrom="%s" dnsto="%s"/>' . "\n", + // $data1->locid, $data1->locname, $data1->lat,$data1->lng,$data2->locid, $data2->locname, $data2->lat, $data2->lng, $link->label, $link->channel, $link->defaultroute, $link->frequency, $link->dnsfrom,$link->dnsto); + printf("\t" .'<Placemark id="%s_%s">' . "\n", $data1->locid, $data2->locid); + printf("\t" .' <name>%s - %s</name>' . "\n", $data1->locname, $data2->locname); + printf("\t" .' <styleUrl>%s</styleUrl>' . "\n", ($link->label=='-1' ? '#ffstyle_vpn' : '#ffstyle_link')); + printf("\t" .' <LineString>' . "\n"); + printf("\t" .' <altitudeMode>clampedToGround</altitudeMode><visibility>0</visibility>' . "\n"); + printf("\t" .' <coordinates>' . "\n"); + printf("\t" .' %s,%s' . "\n", $data1->lng, $data1->lat); + printf("\t" .' %s,%s' . "\n", $data2->lng, $data2->lat); + printf("\t" .' </coordinates>' . "\n"); + printf("\t" .' </LineString>' . "\n"); + printf("\t" .'</Placemark>' . "\n"); +} +?> + </Folder> </Document> </kml> |