GeoMashup
[ class tree: GeoMashup ] [ index: GeoMashup ] [ all elements ]

Class: GeoMashupHttpGeocoder

Source Location: /geo-mashup-geocoders.php

Class Overview


The Geo Mashup Http Geocoder base class.


Author(s):

Variables

Methods


Child classes:

GeoMashupGeonamesGeocoder
HTTP geocoder using the geonames web services.
GeoMashupGoogleGeocoder
HTTP geocoder using the Google geocoding web service
GeoMashupNominatimGeocoder
HTTP geocoder using the nominatim web service.

Class Details

[line 17]
The Geo Mashup Http Geocoder base class.



Tags:

abstract:  
since:  1.4


[ Top ]


Class Variables

$http =

[line 23]

WP_Http instance



Tags:

since:  1.4
access:  protected

Type:   float


[ Top ]

$language =

[line 34]

Language code.



Tags:

since:  1.4
access:  public

Type:   string


[ Top ]

$max_results =

[line 39]

Maximum number of results



Tags:

access:  public

Type:   int


[ Top ]

$request_params =

[line 28]

Parameters to use with http requests.



Tags:

access:  public

Type:   array


[ Top ]



Class Methods


constructor __construct [line 49]

GeoMashupHttpGeocoder __construct( [string $args = array()])

Constructor



Tags:

access:  public


Overridden in child classes as:

GeoMashupGeonamesGeocoder::__construct()
GeoMashupGoogleGeocoder::__construct()
GeoMashupNominatimGeocoder::__construct()

Parameters:

string   $args   Optional array of arguments: language - two digit language code, defaults to blog language max_results - maximum number of results to fetch default http params - array of WP_Http request parameters, including timeout

[ Top ]

method geocode [line 73]

array|WP_Error geocode( string $query)

Look up locations from a text query, like an address or place name.



Tags:

return:  Array of search result locations.
abstract:  
since:  1.4
access:  public


Overridden in child classes as:

GeoMashupGeonamesGeocoder::geocode()
GeoMashupGoogleGeocoder::geocode()
GeoMashupNominatimGeocoder::geocode()

Parameters:

string   $query   Text query.

[ Top ]

method reverse_geocode [line 88]

array|WP_Error reverse_geocode( float $lat, float $lng)

Look up additional location information from coordinates.

Resulting locations have as much address information as possible filled in. Most services return the nearest match first, and some return only one.




Tags:

return:  Array of search result locations.
abstract:  
since:  1.4
access:  public


Overridden in child classes as:

GeoMashupGeonamesGeocoder::reverse_geocode()
GeoMashupGoogleGeocoder::reverse_geocode()
GeoMashupNominatimGeocoder::reverse_geocode()

Parameters:

float   $lat   Latitude
float   $lng   Longitude

[ Top ]


Documentation generated on Sat, 09 Jul 2011 21:54:42 -0700 by phpDocumentor 1.4.3