__construct()
boundingBox()
geocode()
getAddress()
getBounds()
getBoundsNortheast()
getBoundsNortheastLatitude()
getBoundsNortheastLongitude()
getBoundsSouthwest()
getBoundsSouthwestLatitude()
getBoundsSouthwestLongitude()
getFormat()
getLanguage()
getLatitude()
getLatitudeLongitude()
getLongitude()
getRegion()
getSensor()
isFormatJson()
isFormatXml()
setAddress()
setBounds()
setBoundsNortheast()
setBoundsSouthwest()
setFormat()
setLanguage()
setLatitude()
setLatitudeLongitude()
setLongitude()
setRegion()
setSensor()
geocodeQueryString()
geocodeUrl()
$address
$boundsNortheastLatitude
$boundsNortheastLongitude
$boundsSouthwestLatitude
$boundsSouthwestLongitude
$format
$language
$latitude
$longitude
$region
$sensor
EQUATOR_LAT_DEGREE_IN_MILES
FORMAT_JSON
FORMAT_XML
LOCATION_TYPE_APPROXIMATE
LOCATION_TYPE_CENTER
LOCATION_TYPE_RANGE
LOCATION_TYPE_ROOFTOP
STATUS_INVALID_REQUEST
STATUS_NO_RESULTS
STATUS_OVER_LIMIT
STATUS_REQUEST_DENIED
STATUS_SUCCESS
TYPE_ADMIN_AREA_1
TYPE_ADMIN_AREA_2
TYPE_ADMIN_AREA_3
TYPE_AIRPORT
TYPE_COLLOQUIAL_AREA
TYPE_COUNTRY
TYPE_FLOOR
TYPE_INTERSECTION
TYPE_LOCALITY
TYPE_NATURAL_FEATURE
TYPE_NEIGHBORHOOD
TYPE_PARK
TYPE_POINT_OF_INTEREST
TYPE_POLITICAL
TYPE_POSTAL_CODE
TYPE_POST_BOX
TYPE_PREMISE
TYPE_ROOM
TYPE_ROUTE
TYPE_STREET_ADDRESS
TYPE_STREET_NUMBER
TYPE_SUB_LOCALITY
TYPE_SUB_PREMISE
URL_HTTP
URL_HTTPS
A PHP wrapper for the Google Maps Geocoding API v3.
| author | Justin Stayton |
|---|---|
| copyright | Copyright 2011-2012 by Justin Stayton |
| license | MIT License |
| link | https://developers.google.com/maps/documentation/geocoding/ |
| package | GoogleMapsGeocoder |
| version | 2.0.1 |
__construct(string $address, string $format, bool | string $sensor) : \GoogleMapsGeocoder
The request is not executed until geocode() is called.
stringoptional address to geocode
stringoptional response format (JSON default)
boolstringoptional whether device has location sensor
boundingBox(float | string $latitude, float | string $longitude, int | float | string $mileRange) : array
This can then be used to find all locations within an X-mile range of a central location. A bounding box is much easier and faster to compute than a bounding radius.
The returned array contains two keys: 'lat' and 'lon'. Each of these contains another array with two keys: 'max' and 'min'. Four points are returned in total.
floatstringto draw the bounding box around
floatstringto draw the bounding box around
intfloatstringmile range around point
array'lat' and 'lon' 'min' and 'max' pointsgeocode(bool $https, bool $raw) : string | array | \SimpleXMLElement
The return type is based on the requested format: associative array if JSON, SimpleXMLElement object if XML.
| link | https://developers.google.com/maps/documentation/geocoding/#GeocodingResponses |
|---|
boolwhether to make the request over HTTPS
boolwhether to return the raw (string) response
getAddress() : string
stringgetBounds() : string | false
| link | https://developers.google.com/maps/documentation/geocoding/#Viewports |
|---|
stringfalsecomma-separated, pipe-delimited coordinates, or false if not setgetBoundsNortheast() : string | false
| link | https://developers.google.com/maps/documentation/geocoding/#Viewports |
|---|
stringfalsecomma-separated coordinates, or false if not setgetBoundsNortheastLatitude() : float | string
| link | https://developers.google.com/maps/documentation/geocoding/#Viewports |
|---|
floatstringnortheast latitude boundarygetBoundsNortheastLongitude() : float | string
| link | https://developers.google.com/maps/documentation/geocoding/#Viewports |
|---|
floatstringnortheast longitude boundarygetBoundsSouthwest() : string | false
| link | https://developers.google.com/maps/documentation/geocoding/#Viewports |
|---|
stringfalsecomma-separated coordinates, or false if not setgetBoundsSouthwestLatitude() : float | string
| link | https://developers.google.com/maps/documentation/geocoding/#Viewports |
|---|
floatstringsouthwest latitude boundarygetBoundsSouthwestLongitude() : float | string
| link | https://developers.google.com/maps/documentation/geocoding/#Viewports |
|---|
floatstringsouthwest longitude boundarygetFormat() : string
| link | https://developers.google.com/maps/documentation/geocoding/#GeocodingResponses |
|---|
stringresponse formatgetLanguage() : string
| link | https://spreadsheets.google.com/pub?key=p9pdwsai2hDMsLkXsoM05KQ&gid=1 |
|---|
stringlanguage codegetLatitude() : float | string
| link | https://developers.google.com/maps/documentation/geocoding/#ReverseGeocoding |
|---|
floatstringlatitude to reverse geocodegetLatitudeLongitude() : string | false
| link | https://developers.google.com/maps/documentation/geocoding/#ReverseGeocoding |
|---|
stringfalsecomma-separated coordinates, or false if not setgetLongitude() : float | string
| link | https://developers.google.com/maps/documentation/geocoding/#ReverseGeocoding |
|---|
floatstringlongitude to reverse geocodegetRegion() : string
| link | https://developers.google.com/maps/documentation/geocoding/#RegionCodes |
|---|
stringtwo-character, top-level domain (ccTLD)getSensor() : string
string'true' or 'false'isFormatJson() : bool
isFormatXml() : bool
setBounds(float | string $southwestLatitude, float | string $southwestLongitude, float | string $northeastLatitude, float | string $northeastLongitude) : \GoogleMapsGeocoder
| link | https://developers.google.com/maps/documentation/geocoding/#Viewports |
|---|
floatstringsouthwest latitude boundary
floatstringsouthwest longitude boundary
floatstringnortheast latitude boundary
floatstringnortheasy longitude boundary
setBoundsNortheast(float | string $latitude, float | string $longitude) : \GoogleMapsGeocoder
| link | https://developers.google.com/maps/documentation/geocoding/#Viewports |
|---|
floatstringnortheast latitude boundary
floatstringnortheast longitude boundary
setBoundsSouthwest(float | string $latitude, float | string $longitude) : \GoogleMapsGeocoder
| link | https://developers.google.com/maps/documentation/geocoding/#Viewports |
|---|
floatstringsouthwest latitude boundary
floatstringsouthwest longitude boundary
setFormat(string $format) : \GoogleMapsGeocoder
| link | https://developers.google.com/maps/documentation/geocoding/#GeocodingResponses |
|---|
stringresponse format
setLanguage(string $language) : \GoogleMapsGeocoder
| link | https://spreadsheets.google.com/pub?key=p9pdwsai2hDMsLkXsoM05KQ&gid=1 |
|---|
stringlanguage code
setLatitude(float | string $latitude) : \GoogleMapsGeocoder
| link | https://developers.google.com/maps/documentation/geocoding/#ReverseGeocoding |
|---|
floatstringlatitude to reverse geocode
setLatitudeLongitude(float | string $latitude, float | string $longitude) : \GoogleMapsGeocoder
| link | https://developers.google.com/maps/documentation/geocoding/#ReverseGeocoding |
|---|
floatstringlatitude to reverse geocode
floatstringlongitude to reverse geocode
setLongitude(float | string $longitude) : \GoogleMapsGeocoder
| link | https://developers.google.com/maps/documentation/geocoding/#ReverseGeocoding |
|---|
floatstringlongitude to reverse geocode
setRegion(string $region) : \GoogleMapsGeocoder
| link | https://developers.google.com/maps/documentation/geocoding/#RegionCodes |
|---|
stringtwo-character, top-level domain (ccTLD)
setSensor(bool | string $sensor) : \GoogleMapsGeocoder
geocodeQueryString() : string
| link | https://developers.google.com/maps/documentation/geocoding/#GeocodingRequests |
|---|
stringencoded query string of the geocode requestgeocodeUrl(bool $https) : string
| link | https://developers.google.com/maps/documentation/geocoding/#GeocodingRequests |
|---|
boolwhether to make the request over HTTPS
stringURL of the geocode request$address : string
$boundsNortheastLatitude : float | string
$boundsNortheastLongitude : float | string
$boundsSouthwestLatitude : float | string
$boundsSouthwestLongitude : float | string
$format : string
$language : string
$latitude : float | string
$longitude : float | string
$region : string
$sensor : string
EQUATOR_LAT_DEGREE_IN_MILES
FORMAT_JSON
FORMAT_XML
LOCATION_TYPE_APPROXIMATE
LOCATION_TYPE_CENTER
LOCATION_TYPE_RANGE
LOCATION_TYPE_ROOFTOP
STATUS_INVALID_REQUEST
STATUS_NO_RESULTS
STATUS_OVER_LIMIT
STATUS_REQUEST_DENIED
STATUS_SUCCESS
TYPE_ADMIN_AREA_1
TYPE_ADMIN_AREA_2
TYPE_ADMIN_AREA_3
TYPE_AIRPORT
TYPE_COLLOQUIAL_AREA
TYPE_COUNTRY
The highest order type returned.
TYPE_FLOOR
TYPE_INTERSECTION
TYPE_LOCALITY
TYPE_NATURAL_FEATURE
TYPE_NEIGHBORHOOD
TYPE_PARK
TYPE_POINT_OF_INTEREST
TYPE_POLITICAL
TYPE_POSTAL_CODE
TYPE_POST_BOX
TYPE_PREMISE
TYPE_ROOM
TYPE_ROUTE
TYPE_STREET_ADDRESS
TYPE_STREET_NUMBER
TYPE_SUB_LOCALITY
TYPE_SUB_PREMISE
URL_HTTP
URL_HTTPS