10 defined(
'JPATH_PLATFORM') or die();
34 public function retrieveGps($left, $bottom, $right, $top, $page = 0)
37 $base =
'trackpoints?bbox=' . $left .
',' . $bottom .
',' . $right .
',' . $top .
'&page=' . $page;
40 $path = $this->getOption(
'api.url') . $base;
43 $response = $this->oauth->oauthRequest($path,
'GET', array());
45 $xml_string = simplexml_load_string($response->body);
65 public function uploadTrace($file, $description, $tags, $public, $visibility, $username, $password)
70 'description' => $description,
73 'visibility' => $visibility
80 $path = $this->getOption(
'api.url') . $base;
82 $header[
'Content-Type'] =
'multipart/form-data';
84 $header = array_merge($header, $parameters);
85 $header = array_merge($header, array(
'Authorization' =>
'Basic ' . base64_encode($username .
':' . $password)));
88 $response = $this->sendRequest($path,
'POST', $header, array());
104 public function downloadTraceMetadetails($id, $username, $password)
107 $base =
'gpx/' . $id .
'/details';
110 $path = $this->getOption(
'api.url') . $base;
113 $xml_string = $this->sendRequest($path,
'GET', array(
'Authorization' =>
'Basic ' . base64_encode($username .
':' . $password)));
129 public function downloadTraceMetadata($id, $username, $password)
132 $base =
'gpx/' . $id .
'/data';
135 $path = $this->getOption(
'api.url') . $base;
138 $xml_string = $this->sendRequest($path,
'GET', array(
'Authorization' =>
'Basic ' . base64_encode($username .
':' . $password)));