BMLT PHP Query Client

GeocodingService
in package

Geocoding service using OpenStreetMap Nominatim

Table of Contents

Constants

NOMINATIM_BASE_URL  = 'https://nominatim.openstreetmap.org'

Properties

$bounded  : bool
$client  : Client
$countryCode  : string|null
$retryCount  : int
$timeout  : int
$userAgent  : string
$viewbox  : array<string|int, mixed>|null

Methods

__construct()  : mixed
geocode()  : GeocodeResult
Geocode an address to coordinates
reverseGeocode()  : GeocodeResult
Reverse geocode coordinates to an address
validateCoordinates()  : void
Validate coordinates

Constants

NOMINATIM_BASE_URL

private mixed NOMINATIM_BASE_URL = 'https://nominatim.openstreetmap.org'

Properties

$userAgent read-only

private string $userAgent = 'bmlt-php-query-client/1.0.0'

$viewbox read-only

private array<string|int, mixed>|null $viewbox = null

Methods

__construct()

public __construct([int $timeout = 10 ][, int $retryCount = 3 ][, string $userAgent = 'bmlt-php-query-client/1.0.0' ][, string|null $countryCode = null ][, array<string|int, mixed>|null $viewbox = null ][, bool $bounded = false ]) : mixed
Parameters
$timeout : int = 10
$retryCount : int = 3
$userAgent : string = 'bmlt-php-query-client/1.0.0'
$countryCode : string|null = null
$viewbox : array<string|int, mixed>|null = null
$bounded : bool = false

        
On this page

Search results