Services_OpenStreetMap

# Class: Services_OpenStreetMap_Nominatim

Source Location: /OpenStreetMap/Nominatim.php

### Class Overview

Services_OpenStreetMap_Nominatim

#### Author(s):

- Ken Guest <kguest@php.net>

### Variables

- $accept_language
- $addresssdetails
- $bounded
- $dedupe
- $format
- $limit
- $polygon
- $server
- $transport
- $viewbox

### Methods

- __construct
- getFormat
- getLimit
- getServer
- getTransport
- search
- setFormat
- setLimit
- setServer
- setTransport

### Class Details

[line 24]
Services_OpenStreetMap_Nominatim

#### Tags:

author: | Ken Guest <kguest@php.net>
link: | Nominatim.php
license: | BSD

[ Top ]

### Class Variables

#### $accept_language = 'en'

[line 29]

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $addresssdetails = 0

[line 28]

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $bounded = null

[line 32]

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $dedupe = null

[line 33]

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $format = 'xml'

[line 27]

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $limit = null

[line 35]

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $polygon = null

[line 30]

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $server = 'http://nominatim.openstreetmap.org/'

[line 26]

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $transport = null

[line 37]

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $viewbox = null

[line 31]

#### Tags:

access: | protected

Type: | mixed

[ Top ]

### Class Methods

### constructor __construct [line 46]

`Services_OpenStreetMap_Nominatim __construct( Services_OpenStreetMap_Transport $transport)`

__construct

#### Tags:

access: | public

#### Parameters:

Services_OpenStreetMap_Transport | $transport | Transport instance.

[ Top ]

### method getFormat [line 146]

`string getFormat( )`

get which format is set for this instance (xml, json, html)

#### Tags:

access: | public

[ Top ]

### method getLimit [line 175]

`integer getLimit( )`

get Limit

#### Tags:

access: | public

[ Top ]

### method getServer [line 245]

`string getServer( )`

Retrieve server endpoint.

#### Tags:

access: | public

[ Top ]

### method getTransport [line 198]

`Services_OpenStreetMap_Transport getTransport( )`

Get current Transport object.

#### Tags:

access: | public

[ Top ]

### method search [line 93]

`void search( string $place, [integer $limit = null])`

search

#### Tags:

access: | public

#### Parameters:

string | $place | Name of place to geocode
integer | $limit | Maximum number of results to retrieve (optional)

[ Top ]

### method setFormat [line 125]

`Services_OpenStreetMap_Nominatim setFormat( string $format)`

setFormat

#### Tags:

throws: | Services_OpenStreetMap_RuntimeException If the specified format is not supported.
access: | public

#### Parameters:

string | $format | Set format for data to be received in (html, json, xml)

[ Top ]

### method setLimit [line 158]

`Services_OpenStreetMap_Nominatim setLimit( integer $limit)`

setLimit

#### Tags:

access: | public

#### Parameters:

integer | $limit | Maximum number of entries to retrieve

[ Top ]

### method setServer [line 213]

`Services_OpenStreetMap_Nominatim setServer( string $server)`

Set which server to connect to.

Possible values are 'nominatim', 'mapquest' and any other valid endpoint specified as an URL.

#### Tags:

access: | public

#### Parameters:

string | $server | Server URL or shorthand (nominatim / mapquest)

[ Top ]

### method setTransport [line 187]

`Services_OpenStreetMap_Nominatim setTransport( Services_OpenStreetMap_Transport $transport)`

set Transport object.

#### Tags:

access: | public

#### Parameters:

Services_OpenStreetMap_Transport | $transport | transport object

[ Top ]

Documentation generated on Wed, 26 Sep 2012 01:24:53 +0100 by phpDocumentor 1.4.4