Kajona\Maps\System\Geocoder

Class to receive geo coordinates of local addresses using external services like Google Maps.

Please set your API hosts and keys in the service-specific function, e.g. lookupAddressUsingGoogle()
Choose which remote service you want to use by setting the ApiId like:
$objGeocoder = new Geocoder(0); (0 = Google Maps; 1 = Yahoo! Maps)
ATTENTION: Please respect the terms of use of the remote services! E.g. Google only allows the use
in conjunction with displaying the results on a Google map.

Synopsis

class Geocoder {
}

Members

private

  • $floatLatitude
  • $floatLongitude
  • $intAccuracy
  • $intApiId — int
    0 = Google Maps 1 = Yahoo! Maps
  • $strAdministrativeArea
  • $strCity
  • $strCountryCode
  • $strPostalCode
  • $strResponseRaw
  • $strStreet
  • $strSubAdministrativeArea

Methods

private

  • lookupAddressUsingGoogle() — Does the remote address lookup using the Google Maps API. Returns true if an address was found.
  • lookupAddressUsingYahoo() — Does the remote address lookup using the Yahoo! Maps Geocoding API. Returns true if an address was found.

public