◆ __construct()
SMWDIGeoCoord::__construct |
( |
| ) |
|
Takes a latitude and longitude, and optionally an altitude. These can be provided in 2 forms:
- An associative array with lat, lon and alt keys
- Lat, lon and alt arguments
The second way to provide the arguments, as well as the altitude argument, where introduced in SMW 1.7.
◆ doUnserialize()
static SMWDIGeoCoord::doUnserialize |
( |
|
$serialization | ) |
|
|
static |
Create a data item from the provided serialization string and type ID.
- Note
- PHP can convert any string to some number, so we do not do validation here (because this would require less efficient parsing).
- Parameters
-
- Returns
- self
◆ getAltitude()
SMWDIGeoCoord::getAltitude |
( |
| ) |
|
Returns the altitude if set, null otherwise.
- Returns
- float|null
◆ getCoordinateSet()
SMWDIGeoCoord::getCoordinateSet |
( |
| ) |
|
Returns the coordinate set as an array with lat and long (and alt) keys pointing to float values.
- Returns
- array
◆ getDIType()
SMWDIGeoCoord::getDIType |
( |
| ) |
|
◆ getLatitude()
SMWDIGeoCoord::getLatitude |
( |
| ) |
|
◆ getLongitude()
SMWDIGeoCoord::getLongitude |
( |
| ) |
|
◆ getSerialization()
SMWDIGeoCoord::getSerialization |
( |
| ) |
|
◆ getSortKey()
SMWDIGeoCoord::getSortKey |
( |
| ) |
|
◆ newFromLatLong()
static SMWDIGeoCoord::newFromLatLong |
( |
float |
$latitude, |
|
|
float |
$longitude |
|
) |
| |
|
static |
The documentation for this class was generated from the following file: