We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All

GroundOverlay

public final class GroundOverlay

Defines an image that is fixed to a map.

Public Fields

None.

Constructor

None.

Public Method Summary

Return typeMethod name
booleanequals(Object other)
floatgetBearing()
LatLngBoundsgetBounds()
floatgetHeight()
StringgetId()
LatLnggetPosition()
ObjectgetTag()
floatgetTransparency()
floatgetWidth()
floatgetZIndex()
inthashCode()
booleanisClickable()
booleanisVisible()
voidremove()
voidsetBearing(float bearing)
voidsetClickable(boolean clickable)
voidsetDimensions(float width, float height)
voidsetDimensions(float width)
voidsetImage(BitmapDescriptor imageDescriptor)
voidsetPosition(LatLng latLng)
voidsetPositionFromBounds(LatLngBounds bounds)
voidsetTag(Object tag)
voidsetTransparency(float transparency)
voidsetVisible(boolean visible)
voidsetZIndex(float zIndex)

Public Methods

Method
public boolean equals(Object other)
Checks whether a GroundOverlay object equals another.


Parameters:

Parameter nameParameter desc
otherName of another GroundOverlay object.


Return:

Return typeParameter desc
booleanIf the GroundOverlay objects are equal, true is returned. Otherwise, false is returned.
Method
public float getBearing()
Obtains the bearing of a ground overlay.


Parameters:
None.
Return:

Return typeParameter desc
floatBearing of a ground overlay.
Method
public LatLngBounds getBounds()
Obtains the bounds of a ground overlay.


Parameters:
None.
Return:

Return typeParameter desc
LatLngBoundsBounds of a ground overlay.
Method
public float getHeight()
Obtains the height of a ground overlay.


Parameters:
None.
Return:

Return typeParameter desc
floatHeight of a ground overlay, in meters.
Method
public String getId()
Obtains the ID of a ground overlay on a map. The ID will be unique among all ground overlays on a map.


Parameters:
None.
Return:

Return typeParameter desc
StringID of a ground overlay.
Method
public LatLng getPosition()
Obtains the position of a ground overlay.


Parameters:
None.
Return:

Return typeParameter desc
LatLngLongitude and latitude of a ground overlay.
Method
public float getTransparency()
Obtains the transparency of a ground overlay.


Parameters:
None.
Return:

Return typeParameter desc
floatTransparency of a ground overlay. The value ranges from 0 (completely opaque) to 1 (completely transparent).
Method
public Object getTag()
Obtains the tag that has been set for a ground overlay.


Parameters:
None.
Return:

Return typeParameter desc
ObjectIf no tag has been set, null is returned.
Method
public float getWidth()
Obtains the width of a ground overlay.


Parameters:
None.
Return:

Return typeParameter desc
floatWidth of a ground overlay, in meters.
Method
public float getZIndex()
Obtains the z-index of a ground overlay.


Parameters:
None.
Return:

Return typeParameter desc
floatZ-index, which indicates the overlapping order of a ground overlay.
Method
public int hashCode()
Obtains the hash code of a ground overlay.


Parameters:
None.
Return:

Return typeParameter desc
intHash code of a ground overlay.
Method
public boolean isClickable()
Checks whether a ground overlay is tappable.


Parameters:
None.
Return:

Return typeParameter desc
booleanIf a ground overlay is tappable, true is returned. Otherwise, false is returned.
Method
public boolean isVisible()
Checks whether a ground overlay is visible.


Parameters:
None.
Return:

Return typeParameter desc
booleanIf a ground overlay is visible, true is returned. Otherwise, false is returned.
Method
public void remove()
Removes a ground overlay from a map.


Parameters:
None.
Return:
None.

Method
public void setBearing(float bearing)
Sets the bearing of a ground overlay, in degrees clockwise from north.


Parameters:

Parameter nameParameter desc
bearingBearing of a ground overlay, in degrees clockwise from north. The value ranges from 0 to 360 (excluded). The default value is 0.


Return:
None.

Method
public void setClickable(boolean clickable)
Specifies whether a ground overlay is tappable.


Parameters:

Parameter nameParameter desc
clickableIndicates whether a ground overlay is tappable.


Return:
None.

Method
public void setDimensions(float width, float height)
Sets the width and height of a ground overlay. The image will be scaled to fit the width and height.


Parameters:

Parameter nameParameter desc
widthWidth of a ground overlay, in meters.
heightHeight of a ground overlay, in meters.


Return:
None.

Method
public void setDimensions(float width)
Sets the width of a ground overlay. The height of the ground overlay will be adapted accordingly to the aspect ratio of the image.


Parameters:

Parameter nameParameter desc
widthWidth of a ground overlay, in meters.


Return:
None.

Method
public void setImage(BitmapDescriptor imageDescriptor)
Sets the image for a ground overlay. The new image will occupy the same bounds as the old image.


Parameters:

Parameter nameParameter desc
imageDescriptorImage object.


Return:
None.

Method
public void setPosition(LatLng latLng)
Changes the position of a ground overlay. All other attributes of the ground overlay remain unchanged.


Parameters:

Parameter nameParameter desc
latLngPosition of a ground overlay.


Return:
None.

Method
public void setPositionFromBounds(LatLngBounds bounds)
Sets the position of a ground overlay by fitting it to specified longitude and latitude bounds. This method will ignore the bearing of the ground overlay when positioning it, but the bearing will still be used when the ground overlay is drawn.


Parameters:

Parameter nameParameter desc
boundsBounds of a ground overlay.


Return:
None.

Method
public void setTag(Object tag)
Sets the tag of a ground overlay. If null is passed, the existing tag is cleared.


Parameters:

Parameter nameParameter desc
tagTag of a ground overlay.


Return:
None.

Method
public void setTransparency(float transparency)
Sets the transparency of a ground overlay. The value ranges from 0 to 1. The value 0 indicates opaque and the value 1 indicates transparent. The default value is 0.


Parameters:

Parameter nameParameter desc
transparencyTransparency of a ground overlay. The value ranges from 0 (completely opaque) to 1 (completely transparent). The default value is 0.


Return:
None.

Method
public void setVisible(boolean visible)
Specifies whether a ground overlay is visible. If the ground overlay is invisible, it will not be drawn but all other states will be preserved.


Parameters:

Parameter nameParameter desc
visibleIndicates whether a ground overlay is visible.


Return:
None.

Method
public void setZIndex(float zIndex)
Specifies the z-index of a ground overlay. The z-index indicates the overlapping order of a ground overlay. A ground overlay with a larger z-index overlaps that with a smaller z-index. Ground overlays with the same z-index overlap each other in a random order. By default, the z-index is 0.


Parameters:

Parameter nameParameter desc
zIndexZ-index, which indicates the overlapping order of a ground overlay.


Return:
None.

This page may contain third-party content. For details, click here.
Search in References
Enter a keyword.