Source for file gps.php
Documentation is available at gps.php
* @package Joomla.Platform
* @subpackage Openstreetmap
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
defined('JPATH_PLATFORM') or die();
* Openstreetmap API GPS class for the Joomla Platform
* @package Joomla.Platform
* @subpackage Openstreetmap
* Method to retrieve GPS points
* @param float $left Left boundary
* @param float $bottom Bottom boundary
* @param float $right Right boundary
* @param float $top Top boundary
* @param integer $page Page number
* @return array The XML response containing GPS points
public function retrieveGps($left, $bottom, $right, $top, $page =
0)
$base =
'trackpoints?bbox=' .
$left .
',' .
$bottom .
',' .
$right .
',' .
$top .
'&page=' .
$page;
// Build the request path.
$response =
$this->oauth->oauthRequest($path, 'GET', array());
* Method to upload GPS Traces
* @param string $file File name that contains trace points
* @param string $description Description on trace points
* @param string $tags Tags for trace
* @param integer $public 1 for public, 0 for private
* @param string $visibility One of the following: private, public, trackable, identifiable
* @param string $username Username
* @param string $password Password
* @return JHttpResponse The response
public function uploadTrace($file, $description, $tags, $public, $visibility, $username, $password)
'description' =>
$description,
'visibility' =>
$visibility
// Build the request path.
$header['Content-Type'] =
'multipart/form-data';
$response =
$this->sendRequest($path, 'POST', $header, array());
* Method to download Trace details
* @param integer $id Trace identifier
* @param string $username Username
* @param string $password Password
* @return array The XML response
$base =
'gpx/' .
$id .
'/details';
// Build the request path.
$xml_string =
$this->sendRequest($path, 'GET', array('Authorization' =>
'Basic ' .
base64_encode($username .
':' .
$password)));
* Method to download Trace data
* @param integer $id Trace identifier
* @param string $username Username
* @param string $password Password
* @return array The XML response
$base =
'gpx/' .
$id .
'/data';
// Build the request path.
$xml_string =
$this->sendRequest($path, 'GET', array('Authorization' =>
'Basic ' .
base64_encode($username .
':' .
$password)));
Documentation generated on Tue, 19 Nov 2013 15:04:01 +0100 by phpDocumentor 1.4.3