| @@ 133-137 (lines=5) @@ | ||
| 130 | $waypoint_pieces = explode(' ', $spotter_item['waypoints']); |
|
| 131 | $waypoint_pieces = array_chunk($waypoint_pieces, 2); |
|
| 132 | ||
| 133 | foreach ($waypoint_pieces as $waypoint_coordinate) |
|
| 134 | { |
|
| 135 | $output .= $waypoint_coordinate[1].','.$waypoint_coordinate[0].','.$altitude.' '; |
|
| 136 | ||
| 137 | } |
|
| 138 | $output .= '</coordinates>'; |
|
| 139 | $output .= '<altitudeMode>absolute</altitudeMode>'; |
|
| 140 | $output .= '</LineString>'; |
|
| @@ 102-105 (lines=4) @@ | ||
| 99 | $waypoint_pieces = array_chunk($waypoint_pieces, 2); |
|
| 100 | //waypoint plotting |
|
| 101 | $output .= 'MULTILINESTRING(('; |
|
| 102 | foreach ($waypoint_pieces as $waypoint_coordinate) |
|
| 103 | { |
|
| 104 | $output .= $waypoint_coordinate[1].' '.$waypoint_coordinate[0].', '; |
|
| 105 | } |
|
| 106 | $output = substr($output, 0, -2); |
|
| 107 | $output .= ")) "; |
|
| 108 | } |
|