| GeoObject -> getEarthRadius | ![]() |
| GeoObject | back to main page | GeoObject->getDistance |
GeoObject -> getEarthRadius
Returns the radius of the earth in the given unit it is based on the constant GEO_EARTH_RADIUS.
float getEarthRadius([string unit])
| [string $unit] | : | default: GEO_UNIT The unit could be one of these: "km" (Kilometers), "miles" (miles), "sm" (seamiles) |
$dummy = new GeoObject();
print $dummy->getEarthRadius()." ".GEO_UNIT;
6371.0 km
| GeoObject | back to main page | GeoObject->getDistance |