java.lang.Object | |
↳ | com.google.android.gms.maps.model.GroundOverlayOptions |
Defines options for a ground overlay.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
float | NO_DIMENSION | Flag for when no dimension is specified for the height. |
[Expand]
Inherited Constants | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CREATOR |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new set of ground overlay options.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Specifies the anchor to be at a particular point in the image.
| |||||||||||
Specifies the bearing of the ground overlay in degrees clockwise from north.
| |||||||||||
Horizontal distance, normalized to [0, 1], of the anchor from the left edge.
| |||||||||||
Vertical distance, normalized to [0, 1], of the anchor from the top edge.
| |||||||||||
Gets the bearing set for this options object.
| |||||||||||
Gets the bounds set for this options object.
| |||||||||||
Gets the height set for this options object.
| |||||||||||
Gets the image set for this options object.
| |||||||||||
Gets the location set for this options object.
| |||||||||||
Gets the transparency set for this options object.
| |||||||||||
Gets the width set for this options object.
| |||||||||||
Gets the zIndex set for this options object.
| |||||||||||
Specifies the image for this ground overlay.
| |||||||||||
Gets the visibility setting for this options object.
| |||||||||||
Specifies the position for this ground overlay using an anchor point (a
LatLng ),
width and height (both in meters). | |||||||||||
Specifies the position for this ground overlay using an anchor point (a
LatLng )
and the width (in meters). | |||||||||||
Specifies the position for this ground overlay.
| |||||||||||
Specifies the transparency of the ground overlay.
| |||||||||||
Specifies the visibility for the ground overlay.
| |||||||||||
Specifies the ground overlay's zIndex, i.e., the order in which it will be drawn.
|
[Expand]
Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||||||||||||||||||||||||
From interface
android.os.Parcelable
|
Flag for when no dimension is specified for the height.
Creates a new set of ground overlay options.
Specifies the anchor to be at a particular point in the image.
The anchor specifies the point in the image that aligns with the ground overlay's location.
The anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0], where (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.
*-----+-----+-----+-----* | | | | | | | | | | +-----+-----+-----+-----+ | | | X | | (U, V) = (0.7, 0.6) | | | | | *-----+-----+-----+-----*
u | u-coordinate of the anchor, as a ratio of the image width (in the range [0, 1]) |
---|---|
v | v-coordinate of the anchor, as a ratio of the image height (in the range [0, 1]) |
GroundOverlayOptions
object with a new anchor set.
Specifies the bearing of the ground overlay in degrees clockwise from north. The rotation is performed about the anchor point. If not specified, the default is 0 (i.e., up on the image points north).
If a ground overlay with position set using positionFromBounds(LatLngBounds)
is rotated, its
size will preserved and it will no longer be guaranteed to fit inside the bounds.
bearing | the bearing in degrees clockwise from north. Values outside the range [0, 360) will be normalized. |
---|
GroundOverlayOptions
object with a new bearing set.
Horizontal distance, normalized to [0, 1], of the anchor from the left edge.
Vertical distance, normalized to [0, 1], of the anchor from the top edge.
Gets the bearing set for this options object.
Gets the bounds set for this options object.
null
if the position was
set using position(LatLng, float)
or
position(LatLng, float, float)
Gets the height set for this options object.
Gets the image set for this options object.
Gets the location set for this options object.
null
if the position was set using positionFromBounds(LatLngBounds)
.
Gets the transparency set for this options object.
Gets the width set for this options object.
Gets the zIndex set for this options object.
Specifies the image for this ground overlay.
To load an image as a texture (which is used to draw the image on a map), it must be converted into an image with sides that are powers of two. This is so that a mipmap can be created in order to render the texture at various zoom levels - see Mipmap (Wikipedia) for details. Hence, to conserve memory by avoiding this conversion, it is advised that the dimensions of the image are powers of two.
image | the BitmapDescriptor to use for this ground overlay |
---|
GroundOverlayOptions
object with a new image set.
Gets the visibility setting for this options object.
true
if the ground overlay is to be visible; false
if it is not.
Specifies the position for this ground overlay using an anchor point (a LatLng
),
width and height (both in meters). When rendered, the image will be scaled to fit the
dimensions specified (i.e., its proportions will not necessarily be preserved).
location | the location on the map LatLng to which the anchor point in the
given image will remain fixed. The anchor will remain fixed to the position on
the ground when transformations are applied (e.g., setDimensions, setBearing,
etc.). |
---|---|
width | the width of the overlay (in meters) |
height | the height of the overlay (in meters) |
GroundOverlayOptions
object with a new position set.IllegalArgumentException | if anchor is null |
---|---|
IllegalArgumentException | if width or height are negative |
IllegalStateException | if the position was already set using
positionFromBounds(LatLngBounds)
|
Specifies the position for this ground overlay using an anchor point (a LatLng
)
and the width (in meters). When rendered, the image will retain its proportions from the
bitmap, i.e., the height will be calculated to preserve the original proportions of the
image.
location | the location on the map LatLng to which the anchor point in the
given image will remain fixed. The anchor will remain fixed to the position on
the ground when transformations are applied (e.g., setDimensions, setBearing,
etc.). |
---|---|
width | the width of the overlay (in meters). The height will be determined automatically based on the image proportions. |
GroundOverlayOptions
object with a new position set.IllegalArgumentException | if anchor is null |
---|---|
IllegalArgumentException | if width is negative |
IllegalStateException | if the position was already set using
positionFromBounds(LatLngBounds)
|
Specifies the position for this ground overlay. When rendered, the image will be scaled to fit the bounds (i.e., its proportions will not necessarily be preserved).
bounds | a LatLngBounds in which to place the ground overlay |
---|
GroundOverlayOptions
object with a new position set.IllegalStateException | if the position was already set using
position(LatLng, float) or position(LatLng, float, float)
|
---|
Specifies the transparency of the ground overlay. The default transparency is 0
(opaque).
transparency | a float in the range [0..1] where 0 means that the
ground overlay is opaque and 1 means that the ground overlay is
transparent |
---|
GroundOverlayOptions
object with a new visibility setting.IllegalArgumentException | if the transparency is outside the range [0..1]. |
---|
Specifies the visibility for the ground overlay. The default visibility is true
.
GroundOverlayOptions
object with a new visibility setting.
Specifies the ground overlay's zIndex, i.e., the order in which it will be drawn. See the documentation at the top of this class for more information about zIndex.
GroundOverlayOptions
object with a new zIndex set.