class JOpenstreetmapInfo extends JOpenstreetmapObject

Openstreetmap API Info 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
getCapabilities()

Method to get capabilities of the API

array
retrieveMapData( float $left, float $bottom, float $right, float $top)

Method to retrieve map data of a bounding box

array
retrievePermissions()

Method to retrieve permissions for current user

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 getCapabilities()

Method to get capabilities of the API

Return Value

array The XML response

array retrieveMapData( float $left, float $bottom, float $right, float $top)

Method to retrieve map data of a bounding box

Parameters

float $left Left boundary
float $bottom Bottom boundary
float $right Right boundary
float $top Top boundary

Return Value

array The XML response

array retrievePermissions()

Method to retrieve permissions for current user

Return Value

array The XML response