class JOpenstreetmapChangesets extends JOpenstreetmapObject

Openstreetmap API Changesets 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
createChangeset( array $changesets = array())

Method to create a changeset

array
readChangeset( integer $id)

Method to read a changeset

array
updateChangeset( integer $id, array $tags = array())

Method to update a changeset

void
closeChangeset( integer $id)

Method to close a changeset

array
downloadChangeset( integer $id)

Method to download a changeset

array
expandBBoxChangeset( integer $id, array $nodes)

Method to expand the bounding box of a changeset

array
queryChangeset( string $param)

Method to query on changesets

array
diffUploadChangeset( string $xml, integer $id)

Method to upload a diff to a changeset

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 createChangeset( array $changesets = array())

Method to create a changeset

Parameters

array $changesets Array which contains changeset data

Return Value

array The XML response

array readChangeset( integer $id)

Method to read a changeset

Parameters

integer $id identifier of the changeset

Return Value

array The XML response about a changeset

array updateChangeset( integer $id, array $tags = array())

Method to update a changeset

Parameters

integer $id Identifier of the changeset
array $tags Array of tags to update

Return Value

array The XML response of updated changeset

void closeChangeset( integer $id)

Method to close a changeset

Parameters

integer $id identifier of the changeset

Return Value

void

array downloadChangeset( integer $id)

Method to download a changeset

Parameters

integer $id Identifier of the changeset

Return Value

array The XML response of requested changeset

array expandBBoxChangeset( integer $id, array $nodes)

Method to expand the bounding box of a changeset

Parameters

integer $id Identifier of the changeset
array $nodes List of lat lon about nodes

Return Value

array The XML response of changed changeset

array queryChangeset( string $param)

Method to query on changesets

Parameters

string $param Parameters for query

Return Value

array The XML response

array diffUploadChangeset( string $xml, integer $id)

Method to upload a diff to a changeset

Parameters

string $xml Diff data to upload
integer $id Identifier of the changeset

Return Value

array The XML response of result