\n"; ?>
Waypoints de um track GPS:$file
\n"; if (is_readable($file) && ($fp = fopen($file, "r"))) { while (!feof($fp)) { $line = fgets($fp, $bufsize); if($line[0]!='w' && $line[0]!='t') continue; $data = explode(",", $line); if (count($data) > 7) { if($data[0]=="w") { $lat = (float)$data[3]; $lon = (float)$data[4]; $name = str_replace(" ", " ", trim($data[2])); echo "icon.image = \"img/mm_20_red.png\"; "; echo "label = \"$name\"; "; echo "var marker = createInfoIconMarker(new GPoint($lon, $lat), label, icon); "; echo "map.addOverlay(marker);\n"; } } } } if(isset($lat) && isset($lon)) echo "map.centerAndZoom(new GPoint($lon, $lat), 7);"; else echo "map.centerAndZoom(new GPoint(-13.359375, 41.310824), 7);"; echo "\n"; ?>
DEI-ISEP