Position geocoding factory class.

All geocoders inherit from this.

package org.routamc.positioning

 Methods

create (string $type)

This is a static factory method which lets you dynamically create geocoder instances.
Static

It takes care of loading the required class files. The returned instances will be created but not initialized.

Parameters

$type

stringThe type of the geocoder (the file name from the geocoder directory).

Returns

\org_routamc_positioning_geocoderA reference to the newly created geocoder instance.

geocode (array $location, array $options)

Geocode information

Parameters

$location

arrayParameters to geocode with, conforms to XEP-0080

$options

arrayImplementation-specific configuration

Returns

arraycontaining geocoded information

 Properties

 

string $error

Error code from trying to geocode.

Either a midcom_connection::get_error_string() or an additional error code from component