public class Point extends Geometry
| Modifier and Type | Field and Description |
|---|---|
double |
altitude |
boolean |
hasAltitude |
double |
latitude |
double |
longitude |
FEATURE_TYPE| Constructor and Description |
|---|
Point(double lat,
double lng)
Constructs a point with the specified latitude and longitude.
|
Point(double lat,
double lng,
double alt)
Constructs a point with the specified latitude, longitude and altitude.
|
Point(com.google.api.services.mapsengine.model.Feature feature)
Converts the provided Feature into a typed Point, discarding properties.
|
Point(java.util.List<java.lang.Double> rawPoints)
Constructs a Point based on the list provided.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.api.services.mapsengine.model.Feature |
asFeature(java.util.Map<java.lang.String,java.lang.Object> properties)
Returns a Feature that can be used by the Maps Engine API.
|
boolean |
hasAltitude()
Test if this Point has an altitude.
|
java.util.List<java.lang.Double> |
toCoordinates() |
fromGeoJsonpublic final double latitude
public final double longitude
public final double altitude
public final boolean hasAltitude
public Point(double lat,
double lng)
lat - The latitude, between -90 and 90.lng - The longitude, between -180 and 180.java.lang.IllegalArgumentException - When latitude or long are out of bounds.public Point(double lat,
double lng,
double alt)
lat - The latitude, between -90 and 90.lng - The longitude, between -180 and 180.alt - The altitude, in meters.public Point(com.google.api.services.mapsengine.model.Feature feature)
feature - the Feature returned by the APIjava.lang.IllegalArgumentException - when feature is not a single pointpublic Point(java.util.List<java.lang.Double> rawPoints)
rawPoints - A list of 2 or more values representing Longitude,
Latitude and optionally Altitudepublic com.google.api.services.mapsengine.model.Feature asFeature(java.util.Map<java.lang.String,java.lang.Object> properties)
public java.util.List<java.lang.Double> toCoordinates()
public boolean hasAltitude()