class JOpenstreetmapGps extends JOpenstreetmapObject

Openstreetmap API GPS class for the Joomla Platform

Methods

__construct( Registry $options = null, JHttp $client = null, JOpenstreetmapOauth $oauth = null)

Constructor

mixed
getOption( string $key)

Get an option from the JOpenstreetmapObject instance.

setOption( string $key, mixed $value)

Set an option for the JOpenstreetmapObject instance.

sendRequest( string $path, string $method = 'GET', array $headers = array(), mixed $data = '')

Method to send the request which does not require authentication.

array
retrieveGps( float $left, float $bottom, float $right, float $top, integer $page)

Method to retrieve GPS points

JHttpResponse
uploadTrace( string $file, string $description, string $tags, integer $public, string $visibility, string $username, string $password)

Method to upload GPS Traces

array
downloadTraceMetadetails( integer $id, string $username, string $password)

Method to download Trace details

array
downloadTraceMetadata( integer $id, string $username, string $password)

Method to download Trace data

Details

__construct( Registry $options = null, JHttp $client = null, JOpenstreetmapOauth $oauth = null)

Constructor

Parameters

Registry $options &$options Openstreetmap options object.
JHttp $client The HTTP client object.
JOpenstreetmapOauth $oauth Openstreetmap oauth client

mixed getOption( string $key)

Get an option from the JOpenstreetmapObject instance.

Parameters

string $key The name of the option to get.

Return Value

mixed The option value.

JOpenstreetmapObject setOption( string $key, mixed $value)

Set an option for the JOpenstreetmapObject instance.

Parameters

string $key The name of the option to set.
mixed $value The option value to set.

Return Value

JOpenstreetmapObject This object for method chaining.

SimpleXMLElement sendRequest( string $path, string $method = 'GET', array $headers = array(), mixed $data = '')

Method to send the request which does not require authentication.

Parameters

string $path The path of the request to make
string $method The request method.
array $headers The headers passed in the request.
mixed $data Either an associative array or a string to be sent with the post request.

Return Value

SimpleXMLElement The XML response

Exceptions

DomainException

array retrieveGps( float $left, float $bottom, float $right, float $top, integer $page)

Method to retrieve GPS points

Parameters

float $left Left boundary
float $bottom Bottom boundary
float $right Right boundary
float $top Top boundary
integer $page Page number

Return Value

array The XML response containing GPS points

JHttpResponse uploadTrace( string $file, string $description, string $tags, integer $public, string $visibility, string $username, string $password)

Method to upload GPS Traces

Parameters

string $file File name that contains trace points
string $description Description on trace points
string $tags Tags for trace
integer $public 1 for public, 0 for private
string $visibility One of the following: private, public, trackable, identifiable
string $username Username
string $password Password

Return Value

JHttpResponse The response

array downloadTraceMetadetails( integer $id, string $username, string $password)

Method to download Trace details

Parameters

integer $id Trace identifier
string $username Username
string $password Password

Return Value

array The XML response

array downloadTraceMetadata( integer $id, string $username, string $password)

Method to download Trace data

Parameters

integer $id Trace identifier
string $username Username
string $password Password

Return Value

array The XML response