PHP Class Geocoder\Provider\Nominatim

Author: Niklas Närhinen ([email protected])
Inheritance: extends AbstractHttpProvider, implements Geocoder\Provider\LocaleAwareProvider, use trait Geocoder\Provider\LocaleTrait
Afficher le fichier Open project: willdurand/geocoder Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( Http\Client\HttpClient $client, string $rootUrl, string $locale = null )
geocode ( $address ) {@inheritDoc}
getName ( ) {@inheritDoc}
reverse ( $latitude, $longitude ) {@inheritDoc}
withOpenStreetMapServer ( Http\Client\HttpClient $client, string | null $locale = null ) : Nominatim

Private Methods

Méthode Description
executeQuery ( string $query )
getGeocodeEndpointUrl ( )
getNodeValue ( DOMNodeList $element )
getReverseEndpointUrl ( )
xmlResultToArray ( DOMElement $resultNode, DOMElement $addressNode )

Method Details

__construct() public méthode

public __construct ( Http\Client\HttpClient $client, string $rootUrl, string $locale = null )
$client Http\Client\HttpClient An HTTP adapter.
$rootUrl string Root URL of the nominatim server
$locale string A locale (optional).

geocode() public méthode

{@inheritDoc}
public geocode ( $address )

getName() public méthode

{@inheritDoc}
public getName ( )

reverse() public méthode

{@inheritDoc}
public reverse ( $latitude, $longitude )

withOpenStreetMapServer() public static méthode

public static withOpenStreetMapServer ( Http\Client\HttpClient $client, string | null $locale = null ) : Nominatim
$client Http\Client\HttpClient
$locale string | null
Résultat Nominatim