JOpenstreetmapGps

Extends \JOpenstreetmapObject

Openstreetmap API GPS class for the Joomla Platform

deprecated
since

3.2.0

deprecated

4.0 Use the joomla/openstreetmap package via Composer instead

package

Joomla.Platform

Methods

__construct

Constructor

__construct(\Joomla\Registry\Registry &$options = null, \JHttp $client = null, \JOpenstreetmapOauth $oauth = null) 
inherited
since

3.2.0

Arguments

$options

\Joomla\Registry\Registry

$client

\JHttpThe HTTP client object.

$oauth

\JOpenstreetmapOauthOpenstreetmap oauth client

downloadTraceMetadata

Method to download Trace data

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

3.2.0

Arguments

$id

integerTrace identifier

$username

stringUsername

$password

stringPassword

Response

arrayThe XML response

downloadTraceMetadetails

Method to download Trace details

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

3.2.0

Arguments

$id

integerTrace identifier

$username

stringUsername

$password

stringPassword

Response

arrayThe XML response

getOption

Get an option from the JOpenstreetmapObject instance.

getOption(string $key) : mixed
inherited
since

3.2.0

Arguments

$key

stringThe name of the option to get.

Response

mixedThe option value.

retrieveGps

Method to retrieve GPS points

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

3.2.0

Arguments

$left

floatLeft boundary

$bottom

floatBottom boundary

$right

floatRight boundary

$top

floatTop boundary

$page

integerPage number

Response

arrayThe XML response containing GPS points

sendRequest

Method to send the request which does not require authentication.

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

3.2.0

throws

\DomainException

Arguments

$path

stringThe path of the request to make

$method

stringThe request method.

$headers

arrayThe headers passed in the request.

$data

mixedEither an associative array or a string to be sent with the post request.

Response

\SimpleXMLElementThe XML response

setOption

Set an option for the JOpenstreetmapObject instance.

setOption(string $key, mixed $value) : \JOpenstreetmapObject
inherited
since

3.2.0

Arguments

$key

stringThe name of the option to set.

$value

mixedThe option value to set.

Response

\JOpenstreetmapObjectThis object for method chaining.

uploadTrace

Method to upload GPS Traces

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

3.2.0

Arguments

$file

stringFile name that contains trace points

$description

stringDescription on trace points

$tags

stringTags for trace

$public

integer1 for public, 0 for private

$visibility

stringOne of the following: private, public, trackable, identifiable

$username

stringUsername

$password

stringPassword

Response

\JHttpResponseThe response

Properties

options

Options for the Openstreetmap object.

inherited
since

3.2.0

Type(s)

\Joomla\Registry\Registry

client

The HTTP client object to use in sending HTTP requests.

inherited
since

3.2.0

Type(s)

\JHttp

oauth

The OAuth client.

inherited
since

3.2.0

Type(s)

\JOpenstreetmapOauth