public abstract class GeoPointsList extends Object implements Parcelable
LatLng
, that describes a path on the planet.
The list of locations is ordered, from the first location to the last.Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
GeoPointsList() |
Modifier and Type | Method and Description |
---|---|
static GeoPointsList |
concat(List<GeoPointsList> geoShape)
Creates a new a geo shape which is a concatenation of the given list of geo shape.
|
static GeoPointsList |
create(List<LatLng> locations)
Creates a new
GeoPointsList from the given list of located objects. |
static GeoPointsList |
createNoCopy(List<LatLng> locations)
Creates a new
GeoPointsList with the given list of locations without copying the
list. |
static GeoPointsList |
fromGoogleEncoding(String encoding)
Returns a new
GeoPointsList from the given Google-encoded string. |
GeoBox |
getBoundingBox()
Returns the bounding box of this geo shape which doesn't cross the ±180 longitude.
|
GeoBox |
getBoundingBox(double uncrossedLongitude)
Returns the bounding box of this geo shape, which doesn't cross the given longitude.
|
LatLng |
getGeoPoint(int index)
Returns the location at the given index.
|
int |
getGeoPointsCount()
Returns the number of locations in the geo shape.
|
abstract List<LatLng> |
getGeoPointsSequence()
Returns the unmodifiable list of locations this geo shape consists of.
|
GeoPointsList |
getGeoPointsSubList(int startIndex,
int toIndex)
Returns a sub-list of this one, starting with
fromIndex (inclusive), up to
toIndex (exclusive). |
String |
toGoogleEncoding()
Returns the Google-encoding
of this geo shape.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
describeContents, writeToParcel
public static GeoPointsList createNoCopy(List<LatLng> locations)
GeoPointsList
with the given list of locations without copying the
list. Use with care.public static GeoPointsList create(List<LatLng> locations)
GeoPointsList
from the given list of located objects. Note that only the
LatLng
objects themselves, as returned by HasLatLng.getLatLng()
are stored
(in a new list).public abstract List<LatLng> getGeoPointsSequence()
public LatLng getGeoPoint(int index)
public int getGeoPointsCount()
public String toGoogleEncoding()
public static GeoPointsList fromGoogleEncoding(String encoding)
GeoPointsList
from the given Google-encoded string.public GeoBox getBoundingBox()
GeoBox.getBounds(HasLatLng, HasLatLng, double)
for more information.public GeoBox getBoundingBox(double uncrossedLongitude)
GeoBox.getBounds(HasLatLng, HasLatLng, double)
for more information.public static GeoPointsList concat(List<GeoPointsList> geoShape)
public GeoPointsList getGeoPointsSubList(int startIndex, int toIndex)
fromIndex
(inclusive), up to
toIndex
(exclusive). The underlying list of locations is not copied.