__construct (Constructor) [line 93]
Constructor; which optionally sets config details.
Parameters:
autoload [line 76]
boolean autoload(
string
$class)
|
|
Autoloader
Parameters:
bboxToMinMax [line 134]
array bboxToMinMax(
mixed
$minLat, mixed
$minLon, mixed
$maxLat, mixed
$maxLon)
|
|
Convert a 'bbox' ordered set of coordinates to ordering required for get method.
That is, return a,b,c,d as b,a,d,c
Parameters:
get [line 160]
string get(
string
$minLon, string
$minLat, string
$maxLon, string
$maxLat)
|
|
Get XML describing area prescribed by the given co-ordinates.
Use in conjunction with bboxToMinMax if required.
// $osm->get($osm->bboxToMinMax($minLat, $minLon, $maxLat, $maxLon));
$osm->get(-8.3564758
, 52.821022799999994
, -7.7330017
, 53.0428644
);
Parameters:
getApiStatus [line 537]
Status of the main OSM API (offline/readonly/online)
getConfig [line 571]
Get current Config object
getCoordsOfPlace [line 190]
array getCoordsOfPlace(
string
$place)
|
|
Get co-ordinates of some named place
Place can be comma delimited for precision. e.g. 'Limerick, Ireland'
Parameters:
getDatabaseStatus [line 527]
string getDatabaseStatus(
)
|
|
Status of the OSM database (offline/readonly/online)
getGpxStatus [line 547]
Status of the OSM GPX API (offline/readonly/online)
getIDs [line 263]
array getIDs(
mixed
$args)
|
|
Given the results of a call to func_get_args return an array of unique valid IDs specified in those results (either 1 per argument or each argument containing an array of IDs).
Parameters:
getMaxArea [line 466]
Maximum Area
Max size of area that can be downloaded in one request.
getMaxElements [line 517]
Number of elements allowed per changeset
Maximum number of elements...
getMaxNodes [line 500]
Maximum number of nodes per way.
Anymore than that and the way must be split.
getMaxVersion [line 449]
Maximum Version
Max API version supported by connected server.
$config = array('user' => 'fred@example.net', 'password' => 'wilma4eva');
getMinVersion [line 431]
Minimum Version
Min API version supported by connected server.
$config = array('user' => 'fred@example.net', 'password' => 'wilma4eva');
getPlace [line 211]
mixed getPlace(
string
$place, [string
$format = 'xml'], [bool
$addressdetails = false])
|
|
Return a structured result set for $place
Parameters:
getTimeout [line 413]
Return the number of seconds that must elapse before a connection is considered to have timed-out.
getTracepointsPerPage [line 483]
float getTracepointsPerPage(
)
|
|
Maximum number of tracepoints per page.
Re gpx tracepoints.
getTransport [line 581]
Get current Transport object.
getXml [line 293]
loadXml [line 283]
void loadXml(
string
$file)
|
|
Load XML from [cache] file.
Parameters:
reverseGeocode [line 239]
object|string reverseGeocode(
string
$lat, string
$lon, [bool
$addressdetails = true], [int
$zoom = 18], [string
$format = 'xml'])
|
|
ReverseGeocode
Peform a reverse search/geoencoding.
Parameters:
search [line 333]
array search(
array
$criteria)
|
|
Search based on given criteria.
Returns an array of objects such as Services_OpenStreetMap_Node etc.
$osm->loadXML("./osm.osm");
$results =
$osm->search(array
("amenity" =>
"pharmacy"));
echo "List of Pharmacies\n";
echo "==================\n\n";
foreach ($results as $result) {
$name = $result->getTag('name');
$addrStreet = $result->getTag('addr:street');
$addrCity = $result->getTag('addr:city');
$addrCountry = $result->getTag('addr:country');
$addrHouseName = $result->getTag('addr:housename');
$addrHouseNumber = $result->getTag('addr:housenumber');
$openingHours = $result->getTag('opening_hours');
$phone = $result->getTag('phone');
$line1 = ($addrHouseNumber) ? $addrHouseNumber : $addrHouseName;
if ($line1 != null) {
$line1 .= ', ';
}
echo "$name\n{$line1}{$addrStreet}\n$phone\n$openingHours\n\n";
}
Parameters:
setConfig [line 559]
Set Config object
Parameters:
setTransport [line 593]
Set Transport object.
Parameters:
__call [line 612]
mixed __call(
string
$name, array
$arguments)
|
|
Execute method provided by API class.
If possible, call the appropriate method of the API instance.
Parameters: