Package com.mapbox.mapboxsdk.geometry
Contains the Mapbox Maps Android Geometry API classes.
Types
Name | Summary |
---|---|
LatLng | open class LatLng : Parcelable A geographical location which contains a single latitude, longitude pair, with optional altitude. |
LatLngBounds | open class LatLngBounds : Parcelable A geographical area representing a latitude/longitude aligned rectangle. |
LatLngQuad | open class LatLngQuad : Parcelable A geographical area representing a non-aligned quadrilateral This class does not wrap values to the world bounds |
LatLngSpan | open class LatLngSpan : Parcelable A geographical span defined by its latitude and longitude span. |
ProjectedMeters | open class ProjectedMeters : Parcelable ProjectedMeters is a projection of longitude, latitude points in Mercator meters. |
VisibleRegion | open class VisibleRegion : Parcelable Contains the four points defining the four-sided polygon that is visible in a map’s camera. |
LatLng
open class LatLng : Parcelable
A geographical location which contains a single latitude, longitude pair, with optional altitude.
Latitude and longitude are expressed as decimal degrees in the WGS84 datum. By default, altitude is 0.0, or sea level.
Mapbox GL displays maps in the Mercator Projection and projects geographical data automatically, so all data enters in the WGS84 datum.
Constructors
Name | Summary |
---|---|
LatLng | open fun LatLng()Construct a new latitude, longitude point at (0, 0) |
LatLng | open fun LatLng(latitude: Double, longitude: Double)Construct a new latitude, longitude point given double arguments |
LatLng | open fun LatLng(latitude: Double, longitude: Double, altitude: Double)Construct a new latitude, longitude, altitude point given double arguments |
LatLng | open fun LatLng(location: Location)Construct a new latitude, longitude, altitude point given location argument |
LatLng | open fun LatLng(latLng: LatLng)Construct a new latitude, longitude, altitude point given another latitude, longitude, altitude point. |
Functions
Name | Summary |
---|---|
describeContents | abstract fun describeContents(): Int open fun describeContents(): Int Describe the kinds of special objects contained in this Parcelable instance’s marshaled representation. |
distanceTo | open fun distanceTo(other: LatLng): Double Calculate distance between two points |
equals | open fun equals(object: Any): Boolean Indicates whether some other object is “equal to” this one. |
hashCode | open fun hashCode(): Int Returns a hash code value for the object. |
toString | @NonNull() open fun toString(): String Returns a string representation of the object. |
wrap | @NonNull() open fun wrap(): LatLng Return a new LatLng object with a wrapped Longitude. open fun wrap(value: Double, min: Double, max: Double): Double Constrains value to the given range (including min & max) via modular arithmetic. |
writeToParcel | abstract fun writeToParcel(p: Parcel, p1: Int) open fun writeToParcel(out: Parcel, flags: Int) Flatten this object in to a Parcel. |
Properties
Name | Summary |
---|---|
altitude | private open var altitude: Double |
CREATOR | val CREATOR: Parcelable.Creator<LatLng>Inner class responsible for recreating Parcels into objects. |
latitude | private open var latitude: Double |
longitude | private open var longitude: Double |
CREATOR
val CREATOR: Parcelable.Creator<LatLng>
Inner class responsible for recreating Parcels into objects.
altitude
private open var altitude: Double
describeContents
open fun describeContents(): Int
Describe the kinds of special objects contained in this Parcelable instance’s marshaled representation.
Return
a bitmask indicating the set of special object types marshaled by this Parcelable object instance.
distanceTo
open fun distanceTo(other: LatLng): Double
Calculate distance between two points
Return
distance in meters
Parameters
Name | Summary |
---|---|
other | Other LatLng to compare to |
equals
open fun equals(object: Any): Boolean
Indicates whether some other object is “equal to” this one.
Return
True if equal, false if not
Parameters
Name | Summary |
---|---|
object | The object to compare |
hashCode
open fun hashCode(): Int
Returns a hash code value for the object.
Return
the hash code value
latitude
private open var latitude: Double
longitude
private open var longitude: Double
toString
@NonNull()
open fun toString(): String
Returns a string representation of the object.
Return
the string representation
wrap
@NonNull()
Return a new LatLng object with a wrapped Longitude. This allows original data objectto remain unchanged.
Return
new LatLng object with wrapped Longitude
open fun wrap(value: Double, min: Double, max: Double): Double
Constrains value to the given range (including min & max) via modular arithmetic.
Same formula as used in Core GL (wrap.hpp)std::fmod((std::fmod((value - min), d) + d), d) + min;
Multiples of max value will be wrapped to max.
Return
Wrapped value
Parameters
Name | Summary |
---|---|
value | Value to wrap |
min | Minimum value |
max | Maximum value |
writeToParcel
open fun writeToParcel(out: Parcel, flags: Int)
Flatten this object in to a Parcel.
Parameters
Name | Summary |
---|---|
out | The Parcel in which the object should be written. |
flags | Additional flags about how the object should be written |
LatLngBounds
open class LatLngBounds : Parcelable
A geographical area representing a latitude/longitude aligned rectangle.
This class does not wrap values to the world bounds.
Constructors
Name | Summary |
---|---|
LatLngBounds | open fun LatLngBounds(northLatitude: Double, eastLongitude: Double, southLatitude: Double, westLongitude: Double)Construct a new LatLngBounds based on its corners, given in NESWorder. |
Types
Name | Summary |
---|---|
Builder | class Builder Builder for composing LatLngBounds objects. |
Functions
Name | Summary |
---|---|
contains | open fun contains(latLng: LatLng): Boolean Determines whether this LatLngBounds contains a point. open fun contains(other: LatLngBounds): Boolean Determines whether this LatLngBounds contains another bounds. |
describeContents | abstract fun describeContents(): Int open fun describeContents(): Int Describe the kinds of special objects contained in this Parcelable instance’s marshaled representation. |
equals | open fun equals(o: Any): Boolean Determines whether this LatLngBounds matches another one via LatLng. |
from | open fun from(z: Int, x: Int, y: Int): LatLngBounds Constructs a LatLngBounds from a Tile identifier. open fun from(latNorth: Double, lonEast: Double, latSouth: Double, lonWest: Double): LatLngBounds Constructs a LatLngBounds from doubles representing a LatLng pair. |
fromLatLngs | open fun fromLatLngs(latLngs: List<out LatLng>): LatLngBounds Constructs a LatLngBounds that contains all of a list of LatLngobjects. |
getCenter | @NonNull() open fun getCenter(): LatLng Calculates the centerpoint of this LatLngBounds by simple interpolation and returnsit as a point. |
getLatitudeSpan | open fun getLatitudeSpan(): Double Get the absolute distance, in degrees, between the north andsouth boundaries of this LatLngBounds |
getLatNorth | open fun getLatNorth(): Double Get the north latitude value of this bounds. |
getLatSouth | open fun getLatSouth(): Double Get the south latitude value of this bounds. |
getLonEast | open fun getLonEast(): Double Get the east longitude value of this bounds. |
getLongitudeSpan | open fun getLongitudeSpan(): Double Get the absolute distance, in degrees, between the west andeast boundaries of this LatLngBounds |
getLonWest | open fun getLonWest(): Double Get the west longitude value of this bounds. |
getNorthEast | @NonNull() open fun getNorthEast(): LatLng Get the latitude-longitude paur if the north east corner of this bounds. |
getNorthWest | @NonNull() open fun getNorthWest(): LatLng Get the latitude-longitude pair of the north west corner of this bounds. |
getSouthEast | @NonNull() open fun getSouthEast(): LatLng Get the latitude-longitude pair of the south east corner of this bounds. |
getSouthWest | @NonNull() open fun getSouthWest(): LatLng Get the latitude-longitude pair of the south west corner of this bounds. |
getSpan | @NonNull() open fun getSpan(): LatLngSpan Get the area spanned by this LatLngBounds |
hashCode | open fun hashCode(): Int Returns a hash code value for the object. |
include | @NonNull() open fun include(latLng: LatLng): LatLngBounds Constructs a LatLngBounds from current bounds with an additional latitude-longitude pair. |
intersect | @Nullable() open fun intersect(box: LatLngBounds): LatLngBounds Returns a new LatLngBounds that is the intersection of this with another LatLngBounds, @NonNull() open fun intersect(northLat: Double, eastLon: Double, southLat: Double, westLon: Double): LatLngBounds Returns a new LatLngBounds that is the intersection of this with another box. |
isEmptySpan | open fun isEmptySpan(): Boolean Validate if LatLngBounds is empty, determined if absolute distance is |
toLatLngs | @NonNull() open fun toLatLngs(): Array<LatLng> Return an array of LatLng objects resembling this bounds. |
toString | @NonNull() open fun toString(): String Returns a string representaton of the object. |
union | @NonNull() open fun union(bounds: LatLngBounds): LatLngBounds @NonNull() open fun union(northLat: Double, eastLon: Double, southLat: Double, westLon: Double): LatLngBounds Returns a new LatLngBounds that stretches to contain both this and another LatLngBounds. |
world | open fun world(): LatLngBounds Returns the world bounds. |
writeToParcel | abstract fun writeToParcel(p: Parcel, p1: Int) open fun writeToParcel(out: Parcel, flags: Int) Flatten this object in to a Parcel. |
Properties
Name | Summary |
---|---|
CREATOR | val CREATOR: Parcelable.Creator<LatLngBounds>Inner class responsible for recreating Parcels into objects. |
CREATOR
val CREATOR: Parcelable.Creator<LatLngBounds>
Inner class responsible for recreating Parcels into objects.
contains
open fun contains(latLng: LatLng): Boolean
Determines whether this LatLngBounds contains a point.
Return
true, if the point is contained within the bounds
Parameters
Name | Summary |
---|---|
latLng | the point which may be contained |
open fun contains(other: LatLngBounds): Boolean
Determines whether this LatLngBounds contains another bounds.
Return
true, if the bounds is contained within the bounds
Parameters
Name | Summary |
---|---|
other | the bounds which may be contained |
describeContents
open fun describeContents(): Int
Describe the kinds of special objects contained in this Parcelable instance’s marshaled representation.
Return
a bitmask indicating the set of special object types marshaled by this Parcelable object instance.
equals
open fun equals(o: Any): Boolean
Determines whether this LatLngBounds matches another one via LatLng.
Return
a boolean indicating whether the LatLngBounds are equal
Parameters
Name | Summary |
---|---|
o | another object |
fromLatLngs
open fun fromLatLngs(latLngs: List<out LatLng>): LatLngBounds
Constructs a LatLngBounds that contains all of a list of LatLngobjects. Empty lists will yield invalid LatLngBounds.
Return
LatLngBounds
Parameters
Name | Summary |
---|---|
latLngs | List of LatLng objects |
from
open fun from(latNorth: Double, lonEast: Double, latSouth: Double, lonWest: Double): LatLngBounds
Constructs a LatLngBounds from doubles representing a LatLng pair.
This values of latNorth and latSouth should be in the range of [-90, 90],see MIN_LATITUDE and MAX_LATITUDE,otherwise IllegalArgumentException will be thrown.latNorth should be greater or equal latSouth, otherwise IllegalArgumentException will be thrown.
This method doesn’t recalculate most east or most west boundaries.Note @since 7.0.0 lonEast and lonWest will NOT be wrapped to be in the range of [-180, 180],see MIN_LONGITUDE and MAX_LONGITUDE lonEast should be greater or equal lonWest, otherwise IllegalArgumentException will be thrown.
open fun from(z: Int, x: Int, y: Int): LatLngBounds
Constructs a LatLngBounds from a Tile identifier.
Returned bounds will have latitude in the range of Mercator projection.
See also
Name | Summary |
---|---|
com.mapbox.mapboxsdk.constants.GeometryConstants | GeometryConstants#MAX_MERCATOR_LATITUDE |
Parameters
Name | Summary |
---|---|
z | Tile zoom level. |
x | Tile X coordinate. |
y | Tile Y coordinate. |
getCenter
@NonNull()
Calculates the centerpoint of this LatLngBounds by simple interpolation and returnsit as a point. This is a non-geodesic calculation which is not the geographic center.
Return
LatLng center of this LatLngBounds
getLatNorth
open fun getLatNorth(): Double
Get the north latitude value of this bounds.
Return
double latitude value for north
getLatSouth
open fun getLatSouth(): Double
Get the south latitude value of this bounds.
Return
double latitude value for south
getLatitudeSpan
open fun getLatitudeSpan(): Double
Get the absolute distance, in degrees, between the north andsouth boundaries of this LatLngBounds
Return
Span distance
getLonEast
open fun getLonEast(): Double
Get the east longitude value of this bounds.
Return
double longitude value for east
getLonWest
open fun getLonWest(): Double
Get the west longitude value of this bounds.
Return
double longitude value for west
getLongitudeSpan
open fun getLongitudeSpan(): Double
Get the absolute distance, in degrees, between the west andeast boundaries of this LatLngBounds
Return
Span distance
getNorthEast
@NonNull()
open fun getNorthEast(): LatLng
Get the latitude-longitude paur if the north east corner of this bounds.
Return
LatLng of the north east corner
getNorthWest
@NonNull()
open fun getNorthWest(): LatLng
Get the latitude-longitude pair of the north west corner of this bounds.
Return
LatLng of the north west corner
getSouthEast
@NonNull()
open fun getSouthEast(): LatLng
Get the latitude-longitude pair of the south east corner of this bounds.
Return
LatLng of the south east corner
getSouthWest
@NonNull()
open fun getSouthWest(): LatLng
Get the latitude-longitude pair of the south west corner of this bounds.
Return
LatLng of the south west corner
getSpan
@NonNull()
open fun getSpan(): LatLngSpan
Get the area spanned by this LatLngBounds
Return
LatLngSpan area
hashCode
open fun hashCode(): Int
Returns a hash code value for the object.
Return
the hash code
include
@NonNull()
open fun include(latLng: LatLng): LatLngBounds
Constructs a LatLngBounds from current bounds with an additional latitude-longitude pair.
Return
the newly constructed bounds
Parameters
Name | Summary |
---|---|
latLng | the latitude lognitude pair to include in the bounds. |
intersect
@Nullable()
open fun intersect(box: LatLngBounds): LatLngBounds
Returns a new LatLngBounds that is the intersection of this with another LatLngBounds,
Return
LatLngBounds
Parameters
Name | Summary |
---|---|
box | LatLngBounds to intersect with |
@NonNull()
open fun intersect(northLat: Double, eastLon: Double, southLat: Double, westLon: Double): LatLngBounds
Returns a new LatLngBounds that is the intersection of this with another box.
This values of northLat and southLat should be in the range of [-90, 90],see MIN_LATITUDE and MAX_LATITUDE,otherwise IllegalArgumentException will be thrown.northLat should be greater or equal southLat, otherwise IllegalArgumentException will be thrown.
eastLon should be greater or equal westLon, otherwise IllegalArgumentException will be thrown.
Return
LatLngBounds
Parameters
Name | Summary |
---|---|
northLat | Northern Latitude corner point |
eastLon | Eastern Longitude corner point |
southLat | Southern Latitude corner point |
westLon | Western Longitude corner point |
isEmptySpan
open fun isEmptySpan(): Boolean
Validate if LatLngBounds is empty, determined if absolute distance is
Return
boolean indicating if span is empty
toLatLngs
@NonNull()
open fun toLatLngs(): Array<LatLng>
Return an array of LatLng objects resembling this bounds.
Return
an array of 2 LatLng objects.
toString
@NonNull()
open fun toString(): String
Returns a string representaton of the object.
Return
the string representation
union
@NonNull()
open fun union(bounds: LatLngBounds): LatLngBounds
Returns a new LatLngBounds that stretches to contain both this and another LatLngBounds.
Return
LatLngBounds
Parameters
Name | Summary |
---|---|
bounds | LatLngBounds to add |
@NonNull()
open fun union(northLat: Double, eastLon: Double, southLat: Double, westLon: Double): LatLngBounds
Returns a new LatLngBounds that stretches to contain both this and another LatLngBounds.
This values of northLat and southLat should be in the range of [-90, 90],see MIN_LATITUDE and MAX_LATITUDE,otherwise IllegalArgumentException will be thrown.northLat should be greater or equal southLat, otherwise IllegalArgumentException will be thrown.
eastLon should be greater or equal westLon, otherwise IllegalArgumentException will be thrown.
Return
LatLngBounds
Parameters
Name | Summary |
---|---|
northLat | Northern Latitude corner point |
eastLon | Eastern Longitude corner point |
southLat | Southern Latitude corner point |
westLon | Western Longitude corner point |
world
open fun world(): LatLngBounds
Returns the world bounds.
Return
the bounds representing the world
writeToParcel
open fun writeToParcel(out: Parcel, flags: Int)
Flatten this object in to a Parcel.
Parameters
Name | Summary |
---|---|
out | The Parcel in which the object should be written. |
flags | Additional flags about how the object should be written |
Builder
class Builder
Builder for composing LatLngBounds objects.
Functions
Name | Summary |
---|---|
build | open fun build(): LatLngBounds Builds a new LatLngBounds. |
include | @NonNull() open fun include(latLng: LatLng): LatLngBounds.Builder Adds a LatLng object to the LatLngBounds.Builder. |
includes | @NonNull() open fun includes(latLngs: List<LatLng>): LatLngBounds.Builder Adds a LatLng object to the LatLngBounds.Builder. |
build
open fun build(): LatLngBounds
Builds a new LatLngBounds.
Throws an InvalidLatLngBoundsException when no LatLngBounds can be created.
Return
the build LatLngBounds
include
@NonNull()
open fun include(latLng: LatLng): LatLngBounds.Builder
Adds a LatLng object to the LatLngBounds.Builder.
Return
this
Parameters
Name | Summary |
---|---|
latLng | the LatLng to be added |
includes
@NonNull()
open fun includes(latLngs: List<LatLng>): LatLngBounds.Builder
Adds a LatLng object to the LatLngBounds.Builder.
Return
this
Parameters
Name | Summary |
---|---|
latLngs | the List of LatLng objects to be added |
LatLngQuad
open class LatLngQuad : Parcelable
A geographical area representing a non-aligned quadrilateral
This class does not wrap values to the world bounds
Constructors
Name | Summary |
---|---|
LatLngQuad | open fun LatLngQuad(topLeft: LatLng, topRight: LatLng, bottomRight: LatLng, bottomLeft: LatLng)Construct a new LatLngQuad based on its corners,in order top left, top right, bottom left, bottom right |
Functions
Name | Summary |
---|---|
describeContents | abstract fun describeContents(): Int open fun describeContents(): Int |
hashCode | open fun hashCode(): Int |
writeToParcel | abstract fun writeToParcel(p: Parcel, p1: Int) open fun writeToParcel(out: Parcel, arg1: Int) |
Properties
Name | Summary |
---|---|
bottomLeft | private val bottomLeft: LatLng |
bottomRight | private val bottomRight: LatLng |
CREATOR | val CREATOR: Parcelable.Creator<LatLngQuad> |
topLeft | private val topLeft: LatLng |
topRight | private val topRight: LatLng |
CREATOR
val CREATOR: Parcelable.Creator<LatLngQuad>
bottomLeft
private val bottomLeft: LatLng
bottomRight
private val bottomRight: LatLng
describeContents
open fun describeContents(): Int
hashCode
open fun hashCode(): Int
topLeft
topRight
writeToParcel
open fun writeToParcel(out: Parcel, arg1: Int)
LatLngSpan
open class LatLngSpan : Parcelable
A geographical span defined by its latitude and longitude span.
Constructors
Name | Summary |
---|---|
LatLngSpan | open fun LatLngSpan(latitudeSpan: Double, longitudeSpan: Double)Creates a LatLgnSpan. |
Functions
Name | Summary |
---|---|
describeContents | abstract fun describeContents(): Int open fun describeContents(): Int Describe the kinds of special objects contained in this Parcelable instance’s marshaled representation. |
equals | open fun equals(object: Any): Boolean Indicates whether some other object is “equal to” this one. |
getLatitudeSpan | open fun getLatitudeSpan(): Double Returns the latitude span. |
getLongitudeSpan | open fun getLongitudeSpan(): Double Returns to longitude span. |
hashCode | open fun hashCode(): Int Returns a hash code value for the object. |
setLatitudeSpan | open fun setLatitudeSpan(latitudeSpan: Double) Sets the latitude span. |
setLongitudeSpan | open fun setLongitudeSpan(longitudeSpan: Double) Sets the longitude span. |
writeToParcel | abstract fun writeToParcel(p: Parcel, p1: Int) open fun writeToParcel(out: Parcel, flags: Int) Flatten this object in to a Parcel. |
Properties
Name | Summary |
---|---|
CREATOR | val CREATOR: Parcelable.Creator<LatLngSpan>Inner class responsible for recreating Parcels into objects. |
CREATOR
val CREATOR: Parcelable.Creator<LatLngSpan>
Inner class responsible for recreating Parcels into objects.
describeContents
open fun describeContents(): Int
Describe the kinds of special objects contained in this Parcelable instance’s marshaled representation.
Return
a bitmask indicating the set of special object types marshaled by this Parcelable object instance.
equals
open fun equals(object: Any): Boolean
Indicates whether some other object is “equal to” this one.
Return
True if equal, false if not
Parameters
Name | Summary |
---|---|
object | The object to compare |
getLatitudeSpan
open fun getLatitudeSpan(): Double
Returns the latitude span.
Return
The latitude span.
getLongitudeSpan
open fun getLongitudeSpan(): Double
Returns to longitude span.
Return
The longitude span.
hashCode
open fun hashCode(): Int
Returns a hash code value for the object.
Return
hash code value of this
setLatitudeSpan
open fun setLatitudeSpan(latitudeSpan: Double)
Sets the latitude span.
Parameters
Name | Summary |
---|---|
latitudeSpan | The latitude span to set. |
setLongitudeSpan
open fun setLongitudeSpan(longitudeSpan: Double)
Sets the longitude span.
Parameters
Name | Summary |
---|---|
longitudeSpan | The longitude span to set. |
writeToParcel
open fun writeToParcel(out: Parcel, flags: Int)
Flatten this object in to a Parcel.
Parameters
Name | Summary |
---|---|
out | Parcel in which the object should be written |
flags | Additional flags about how the object should be written |
ProjectedMeters
open class ProjectedMeters : Parcelable
ProjectedMeters is a projection of longitude, latitude points in Mercator meters.
these have been projected into Mapbox GL’s Mercator projection. Instead of decimal degrees, it uses Mercator meters (which are notably not equivalent to SI meters) except at the equator.
Constructors
Name | Summary |
---|---|
ProjectedMeters | open fun ProjectedMeters(northing: Double, easting: Double)Creates a ProjectedMeters based on projected meters in north and east direction. |
ProjectedMeters | open fun ProjectedMeters(projectedMeters: ProjectedMeters)Creates a ProjecteMeters based on another set of projected meters. |
Functions
Name | Summary |
---|---|
describeContents | abstract fun describeContents(): Int open fun describeContents(): Int Describe the kinds of special objects contained in this Parcelable instance’s marshaled representation. |
equals | open fun equals(other: Any): Boolean Indicates whether some other object is “equal to” this one. |
hashCode | open fun hashCode(): Int Returns a hash code value for the object. |
toString | @NonNull() open fun toString(): String Returns a string representation of the object. |
writeToParcel | abstract fun writeToParcel(p: Parcel, p1: Int) open fun writeToParcel(out: Parcel, flags: Int) Flatten this object in to a Parcel. |
Properties
Name | Summary |
---|---|
CREATOR | val CREATOR: Parcelable.Creator<ProjectedMeters>Inner class responsible for recreating Parcels into objects. |
easting | private open val easting: Double |
northing | private open val northing: Double |
CREATOR
val CREATOR: Parcelable.Creator<ProjectedMeters>
Inner class responsible for recreating Parcels into objects.
describeContents
open fun describeContents(): Int
Describe the kinds of special objects contained in this Parcelable instance’s marshaled representation.
Return
a bitmask indicating the set of special object types marshaled by this Parcelable object instance.
easting
private open val easting: Double
equals
open fun equals(other: Any): Boolean
Indicates whether some other object is “equal to” this one.
Return
true if equal, false if not
Parameters
Name | Summary |
---|---|
other | The object to compare this to |
hashCode
open fun hashCode(): Int
Returns a hash code value for the object.
Return
the hash code of this
northing
private open val northing: Double
toString
@NonNull()
open fun toString(): String
Returns a string representation of the object.
Return
the string representation of this
writeToParcel
open fun writeToParcel(out: Parcel, flags: Int)
Flatten this object in to a Parcel.
Parameters
Name | Summary |
---|---|
out | The Parcel in which the object should be written. |
flags | Additional flags about how the object should be written |
VisibleRegion
open class VisibleRegion : Parcelable
Contains the four points defining the four-sided polygon that is visible in a map’s camera. This polygon can be a trapezoid instead of a rectangle, because a camera can have tilt. If the camera is directly over the center of the camera, the shape is rectangular, but if the camera is tilted, the shape will appear to be a trapezoid whose smallest side is closest to the point of view.
Constructors
Name | Summary |
---|---|
VisibleRegion | open fun VisibleRegion(farLeft: LatLng, farRight: LatLng, nearLeft: LatLng, nearRight: LatLng, latLngBounds: LatLngBounds)Creates a VisibleRegion given the four corners of the camera. |
Functions
Name | Summary |
---|---|
describeContents | abstract fun describeContents(): Int open fun describeContents(): Int Describe the kinds of special objects contained in this Parcelable instance’s marshaled representation. |
equals | open fun equals(o: Any): Boolean Compares this VisibleRegion to another object.If the other object is actually a pointer to this object,or if all four corners and the bounds of the two objects are the same,this method returns true. |
hashCode | open fun hashCode(): Int Returns a hash code value for the object. |
toString | @NonNull() open fun toString(): String The string representation of the object. |
writeToParcel | abstract fun writeToParcel(p: Parcel, p1: Int) open fun writeToParcel(out: Parcel, flags: Int) Flatten this object in to a Parcel. |
Properties
Name | Summary |
---|---|
CREATOR | val CREATOR: Parcelable.Creator<VisibleRegion>Inner class responsible for recreating Parcels into objects. |
farLeft | val farLeft: LatLngLatLng object that defines the far left corner of the camera. |
farRight | val farRight: LatLngLatLng object that defines the far right corner of the camera. |
latLngBounds | val latLngBounds: LatLngBoundsThe smallest bounding box that includes the visible region defined in this class. |
nearLeft | val nearLeft: LatLngLatLng object that defines the bottom left corner of the camera. |
nearRight | val nearRight: LatLngLatLng object that defines the bottom right corner of the camera. |
CREATOR
val CREATOR: Parcelable.Creator<VisibleRegion>
Inner class responsible for recreating Parcels into objects.
describeContents
open fun describeContents(): Int
Describe the kinds of special objects contained in this Parcelable instance’s marshaled representation.
Return
a bitmask indicating the set of special object types marshaled by this Parcelable object instance.
equals
open fun equals(o: Any): Boolean
Compares this VisibleRegion to another object.If the other object is actually a pointer to this object,or if all four corners and the bounds of the two objects are the same,this method returns true. Otherwise, this method returns false.
Return
true if both objects are the same object.
Parameters
Name | Summary |
---|---|
o | The Object to compare with. |
farLeft
LatLng object that defines the far left corner of the camera.
farRight
LatLng object that defines the far right corner of the camera.
hashCode
open fun hashCode(): Int
Returns a hash code value for the object.
Return
the hash code
latLngBounds
val latLngBounds: LatLngBounds
The smallest bounding box that includes the visible region defined in this class.
nearLeft
LatLng object that defines the bottom left corner of the camera.
nearRight
LatLng object that defines the bottom right corner of the camera.
toString
@NonNull()
open fun toString(): String
The string representation of the object.
Return
the string representation of this
writeToParcel
open fun writeToParcel(out: Parcel, flags: Int)
Flatten this object in to a Parcel.
Parameters
Name | Summary |
---|---|
out | The Parcel in which the object should be written. |
flags | Additional flags about how the object should be written |
Android SDK
SDK JS Reference
- Root
- attribution
- camera
- constants
- exceptions
- geometry
- http
- location
- location.engine
- location.modes
- location.permissions
- log
- maps
- maps.renderer
- maps.renderer.egl
- maps.renderer.glsurfaceview
- maps.renderer.textureview
- maps.widgets
- module.http
- module.loader
- net
- offline
- snapshotter
- storage
- style.expressions
- style.layers
- style.light
- style.sources
- style.types
- text
- utils