public final class GroundOverlay
Defines an image that is fixed to a map.
Public Fields
None.
Constructor
None.
Public Method Summary
Public Methods
| Method |
| public boolean equals(Object other) |
| Checks whether a GroundOverlay object equals another. |
Parameters:
| Parameter name | Parameter desc |
| other | Name of another GroundOverlay object. |
Return:
| Return type | Parameter desc |
| boolean | If 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 type | Parameter desc |
| float | Bearing of a ground overlay. |
| Method |
| public LatLngBounds getBounds() |
| Obtains the bounds of a ground overlay. |
Parameters:
None.
Return:
| Return type | Parameter desc |
| LatLngBounds | Bounds of a ground overlay. |
| Method |
| public float getHeight() |
| Obtains the height of a ground overlay. |
Parameters:
None.
Return:
| Return type | Parameter desc |
| float | Height 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 type | Parameter desc |
| String | ID of a ground overlay. |
| Method |
| public LatLng getPosition() |
| Obtains the position of a ground overlay. |
Parameters:
None.
Return:
| Return type | Parameter desc |
| LatLng | Longitude and latitude of a ground overlay. |
| Method |
| public float getTransparency() |
| Obtains the transparency of a ground overlay. |
Parameters:
None.
Return:
| Return type | Parameter desc |
| float | Transparency 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 type | Parameter desc |
| Object | If no tag has been set, null is returned. |
| Method |
| public float getWidth() |
| Obtains the width of a ground overlay. |
Parameters:
None.
Return:
| Return type | Parameter desc |
| float | Width of a ground overlay, in meters. |
| Method |
| public float getZIndex() |
| Obtains the z-index of a ground overlay. |
Parameters:
None.
Return:
| Return type | Parameter desc |
| float | Z-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 type | Parameter desc |
| int | Hash code of a ground overlay. |
| Method |
| public boolean isClickable() |
| Checks whether a ground overlay is tappable. |
Parameters:
None.
Return:
| Return type | Parameter desc |
| boolean | If 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 type | Parameter desc |
| boolean | If 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 name | Parameter desc |
| bearing | Bearing 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 name | Parameter desc |
| clickable | Indicates 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 name | Parameter desc |
| width | Width of a ground overlay, in meters. |
| height | Height 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 name | Parameter desc |
| width | Width 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 name | Parameter desc |
| imageDescriptor | Image 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 name | Parameter desc |
| latLng | Position 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 name | Parameter desc |
| bounds | Bounds 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 name | Parameter desc |
| tag | Tag 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 name | Parameter desc |
| transparency | Transparency 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 name | Parameter desc |
| visible | Indicates 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 name | Parameter desc |
| zIndex | Z-index, which indicates the overlapping order of a ground overlay. |
Return:
None.
This page may contain third-party content. For details, click
here.