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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new set of ground overlay options.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Specifies the anchor.
| |||||||||||
Specifies the bearing of the ground overlay in degrees clockwise from north.
| |||||||||||
Specifies whether the ground overlay is clickable.
| |||||||||||
Horizontal relative anchor;
0.0 and 1.0 denote left and right
edges respectively. | |||||||||||
Vertical relative anchor;
0.0 and 1.0 denote top and bottom
edges respectively. | |||||||||||
Gets the bearing set for this
GroundOverlayOptions object. | |||||||||||
Gets the bounds set for this
GroundOverlayOptions object. | |||||||||||
Gets the height set for this
GroundOverlayOptions object. | |||||||||||
Gets the image descriptor set for this
GroundOverlayOptions object. | |||||||||||
Gets the location set for this
GroundOverlayOptions object. | |||||||||||
Gets the transparency set for this
GroundOverlayOptions object. | |||||||||||
Gets the width set for this
GroundOverlayOptions object. | |||||||||||
Gets the zIndex set for this
GroundOverlayOptions object. | |||||||||||
Specifies the image for this ground overlay.
| |||||||||||
Gets the clickability setting for this
GroundOverlayOptions object. | |||||||||||
Gets the visibility setting for this
GroundOverlayOptions object. | |||||||||||
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 using an anchor point (a
LatLng ),
width and height (both 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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Flag for when no dimension is specified for the height.
Creates a new set of ground overlay options.
Specifies the anchor.
The anchor aligns with the ground overlay's location.
The anchor point is specified in 2D continuous space where (0,0), (1,0), (0,1) and (1,1) denote the top-left, top-right, bottom-left and bottom-right corners respectively.
*-----+-----+-----+-----* | | | | | | | | | | +-----+-----+-----+-----+ | | | X | | (U, V) = (0.7, 0.6) | | | | | *-----+-----+-----+-----*
Parameters | |
---|---|
u |
float :
u-coordinate of the anchor |
v |
float :
v-coordinate of the anchor |
Returns | |
---|---|
GroundOverlayOptions |
this 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).
Note that latitude-longitude bound applies before the rotation.
Parameters | |
---|---|
bearing |
float :
the bearing in degrees clockwise from north. Values outside the range [0,
360) will be normalized. |
Returns | |
---|---|
GroundOverlayOptions |
this GroundOverlayOptions object with a new bearing set.
|
Specifies whether the ground overlay is clickable. The default clickability is false
.
Parameters | |
---|---|
clickable |
boolean :
The new clickability setting. |
Returns | |
---|---|
GroundOverlayOptions |
this GroundOverlayOptions object with a new clickability setting.
|
Horizontal relative anchor; 0.0
and 1.0
denote left and right
edges respectively. Other anchor values are interpolated accordingly.
Returns | |
---|---|
float |
the horizontal edge-relative anchor location. |
Vertical relative anchor; 0.0
and 1.0
denote top and bottom
edges respectively. Other anchor values are interpolated accordingly.
Returns | |
---|---|
float |
the vertical edge-relative anchor location. |
Gets the bearing set for this GroundOverlayOptions
object.
Returns | |
---|---|
float |
the bearing of the ground overlay. |
Gets the bounds set for this GroundOverlayOptions
object.
Returns | |
---|---|
LatLngBounds |
the bounds of the ground overlay. This will be null if the position was
set using position(LatLng, float) or position(LatLng, float, float)
|
Gets the height set for this GroundOverlayOptions
object.
Returns | |
---|---|
float |
the height of the ground overlay. |
Gets the image descriptor set for this GroundOverlayOptions
object.
Returns | |
---|---|
BitmapDescriptor |
A BitmapDescriptor representing the image of the ground overlay.
|
Gets the location set for this GroundOverlayOptions
object.
Returns | |
---|---|
LatLng |
the location to place the anchor of the ground overlay. This will be null
if the position was set using positionFromBounds(LatLngBounds) .
|
Gets the transparency set for this GroundOverlayOptions
object.
Returns | |
---|---|
float |
the transparency of the ground overlay. |
Gets the width set for this GroundOverlayOptions
object.
Returns | |
---|---|
float |
the width of the ground overlay. |
Gets the zIndex set for this GroundOverlayOptions
object.
Returns | |
---|---|
float |
the zIndex of the ground overlay. |
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.
Parameters | |
---|---|
imageDescriptor |
BitmapDescriptor :
the BitmapDescriptor to use for this ground overlay |
Returns | |
---|---|
GroundOverlayOptions |
this GroundOverlayOptions object with a new image set.
|
Gets the clickability setting for this GroundOverlayOptions
object.
Returns | |
---|---|
boolean |
true if the ground overlay is clickable; false if it is not.
|
Gets the visibility setting for this GroundOverlayOptions
object.
Returns | |
---|---|
boolean |
true if this ground overlay is visible; false if it is not.
|
Specifies the position for this ground overlay using an anchor point (a LatLng
)
and the width (in meters). The height will be adapted accordingly to preserve aspect ratio.
Parameters | |
---|---|
location |
LatLng :
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 |
float :
the width of the overlay (in meters). The height will be determined
automatically based on the image aspect ratio. |
Returns | |
---|---|
GroundOverlayOptions |
this GroundOverlayOptions object with a new position set. |
Throws | |
---|---|
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 using an anchor point (a LatLng
),
width and height (both in meters). When rendered, the image will be scaled to fit the
dimensions specified.
Parameters | |
---|---|
location |
LatLng :
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 |
float :
the width of the overlay (in meters) |
height |
float :
the height of the overlay (in meters) |
Returns | |
---|---|
GroundOverlayOptions |
this GroundOverlayOptions object with a new position set. |
Throws | |
---|---|
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.
Parameters | |
---|---|
bounds |
LatLngBounds :
a LatLngBounds in which to place the ground overlay |
Returns | |
---|---|
GroundOverlayOptions |
this GroundOverlayOptions object with a new position set. |
Throws | |
---|---|
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).
Parameters | |
---|---|
transparency |
float :
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. |
Returns | |
---|---|
GroundOverlayOptions |
this GroundOverlayOptions object with a new transparency setting. |
Throws | |
---|---|
IllegalArgumentException |
if the transparency is outside the range [0..1]. |
Specifies the visibility for the ground overlay. The default visibility is true
.
Parameters | |
---|---|
visible |
boolean
|
Returns | |
---|---|
GroundOverlayOptions |
this GroundOverlayOptions object with a new visibility setting.
|
Parameters | |
---|---|
out |
Parcel
|
flags |
int
|
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.
Parameters | |
---|---|
zIndex |
float
|
Returns | |
---|---|
GroundOverlayOptions |
this GroundOverlayOptions object with a new zIndex set.
|