Creates a GeoCoordinates
from the given latitude, longitude, and optional altitude.
Latitude in degrees.
Longitude in degrees.
Altitude in meters.
Altitude in meters.
Latitude in degrees.
Longitude in degrees.
The latitude in the degrees.
Returns the latitude in degrees.
Returns the latitude in radians.
The longitude in the degrees.
Returns the longitude in degrees.
Returns the longitude in radians.
Clones this GeoCoordinates
.
Copy values from the other.
GeoCoordinatesLike to copy all values from.
Returns true
if this GeoCoordinates
is equal to the other.
GeoCoordinatesLike to compare to.
Returns true
if this GeoCoordinates
is valid; returns false
otherwise.
Returns the minimum longitude span from this GeoCoordinates
to another.
The other GeoCoordinatesLike defining the longitude span.
Returns the normalized GeoCoordinates
.
Converts this GeoCoordinates to a GeoPointLike.
Returns this GeoCoordinates as LatLngLike literal.
Returns a GeoCoordinates
from the given latitude, longitude, and optional altitude.
Latitude in degrees.
Longitude in degrees.
Altitude in meters.
Creates a GeoCoordinates from a GeoPointLike tuple.
Example:
mapView.geoCenter = GeoCoordinates.fromGeoPoint([longitude, latitude]);
let geoCoords: number[] = ...;
if (isGeoPointLike(geoCoords)) {
const p = GeoCoordinates.fromGeoPoint(geoCoords);
}
An [[Array]] of at least two elements following the order longitude, latitude, altitude.
Creates a GeoCoordinates from a LatLngLike literal.
const center = { lat: 53.3, lng: 13.4 };
mapView.geoCenter = GeoCoordinates.fromLatLng(center);
A LatLngLike object literal.
Creates a GeoCoordinates from different types of geo coordinate objects.
Example:
const fromGeoPointLike = GeoCoordinates.fromObject([longitude, latitude]);
const fromGeoCoordinateLike = GeoCoordinates.fromObject({ longitude, latitude });
const fromGeoCoordinate = GeoCoordinates.fromObject(new GeoCoordinates(latitude, longitude));
const fromLatLngLike = GeoCoordinates.fromObject({ lat: latitude , lng: longitude });
Either GeoPointLike, GeoCoordinatesLike or LatLngLike object literal.
Returns a GeoCoordinates
from the given latitude, longitude, and optional altitude.
Latitude in radians.
Longitude in radians.
Altitude in meters.
Returns a GeoCoordinates
resulting from the linear interpolation of other two.
One of the GeoCoordinates
used for interpolation.
The other GeoCoordinates
used for interpolation.
Interpolation factor. If 0
result will be equal to geoCoords0
, if 1
it'll be equal to geoCoords1
.
If true
, interpolation will be done across the antimeridian, otherwise it's
done across the Greenwich meridian. Supported only if longitude span is less than 360 deg.
If true
, interpolation result will be normalized. @default false
Generated using TypeDoc
GeoCoordinates
is used to represent geo positions.