public final class

GroundOverlay

extends Object
java.lang.Object
   ↳ com.amazon.geo.mapsv2.model.GroundOverlay

Class Overview

Ground overlays are not currently supported in the Amazon Maps API.

Ground overlays are images on top of the map that are sized such that they cover the same portion of the map. Zooming in and out makes this image appear bigger or smaller (unlike markers, which stay the same size on the screen regardless of zoom level).

Summary

Public Constructors
GroundOverlay(IGroundOverlayDelegate delegate)
Public Methods
float getBearing()
Gets bearing in degrees clockwise from north
LatLngBounds getBounds()
Gets the bounds that encompasses the ground overlay.
float getHeight()
Gets the height of the ground overlay in meters.
String getId()
Gets this ground overlay's map-unique id.
LatLng getPosition()
Gets the location where this ground overlay is anchored.
float getTransparency()
Gets the transparency of this ground overlay.
float getWidth()
Gets the width of the ground overlay in meters.
float getZIndex()
Gets the order in which this ground overlay is drawn with respect to Polylines, Polygons, and TileOverlays but not Markers.
boolean isVisible()
Retrieves a boolean indicating whether this ground overlay would be drawn given that the ground overlay is within the camera's viewport.
void remove()
Removes this ground overlay.
void setBearing(float bearing)
Sets the bearing of this ground overlay.
void setDimensions(float width)
Sets the width of image on the map in meters.
void setDimensions(float width, float height)
Sets the width and height of the image on the map in meters.
void setImage(BitmapDescriptor image)
Sets the bitmap for this ground overlay and replaces the old image in the same spot.
void setPosition(LatLng latLng)
Sets the new anchor point for this ground overlay and keeps everything else constant.
void setPositionFromBounds(LatLngBounds bounds)
Sets the bounds of the ground overlay ignoring bearing; however, bearing is applied when drawing the overlay.
void setTransparency(float transparency)
Sets the transparency of this ground overlay.
void setVisible(boolean visible)
Sets whether or not this ground overlay is visible given that the overlay is within the camera's viewport.
void setZIndex(float zIndex)
Sets the z-index of this ground overlay.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public GroundOverlay (IGroundOverlayDelegate delegate)

Public Methods

public float getBearing ()

Gets bearing in degrees clockwise from north

Returns
  • bearing of the ground overlay

public LatLngBounds getBounds ()

Gets the bounds that encompasses the ground overlay. This ignores rotation.

Returns
  • LatLngBounds which encompasses the ground overlay ignoring rotation

public float getHeight ()

Gets the height of the ground overlay in meters.

Returns
  • The height in meters

public String getId ()

Gets this ground overlay's map-unique id.

Returns
  • String representing this id

public LatLng getPosition ()

Gets the location where this ground overlay is anchored.

Returns
  • A LatLng of the anchor of the ground overlay

public float getTransparency ()

Gets the transparency of this ground overlay. The range is [0, 1] where 0 is opaque and 1 is effectively invisible.

Returns
  • How transparent this ground overlay is

public float getWidth ()

Gets the width of the ground overlay in meters.

Returns
  • The width in meters

public float getZIndex ()

Gets the order in which this ground overlay is drawn with respect to Polylines, Polygons, and TileOverlays but not Markers. The default is 0. Higher z indexed overlays draw on top of lower z indexed ones.

Returns
  • the z index of this ground overlay

public boolean isVisible ()

Retrieves a boolean indicating whether this ground overlay would be drawn given that the ground overlay is within the camera's viewport.

Returns
  • true if this overlay is visible

public void remove ()

Removes this ground overlay. After calling this method, calling other methods on the removed ground overlay results in undefined behavior.

public void setBearing (float bearing)

Sets the bearing of this ground overlay. This bearing is applied around the anchor point.

Parameters
bearing The bearing (rotation) of the ground overlay, in degrees clockwise from north.

public void setDimensions (float width)

Sets the width of image on the map in meters. The height is subsequently calculated from this width to preserve the aspect ratio.

Parameters
width Width in meters

public void setDimensions (float width, float height)

Sets the width and height of the image on the map in meters. The aspect ratio is not kept and instead, the bitmap is stretched to match these values.

Parameters
width Width in meters
height Height in meters

public void setImage (BitmapDescriptor image)

Sets the bitmap for this ground overlay and replaces the old image in the same spot.

Parameters
image The bitmap for this ground overlay

public void setPosition (LatLng latLng)

Sets the new anchor point for this ground overlay and keeps everything else constant.

Parameters
latLng the new LatLng for the anchor point

public void setPositionFromBounds (LatLngBounds bounds)

Sets the bounds of the ground overlay ignoring bearing; however, bearing is applied when drawing the overlay.

public void setTransparency (float transparency)

Sets the transparency of this ground overlay. This is in the range of [0, 1] where 0 is opaque and 1 is effectively invisible.

Parameters
transparency How transparent to make this ground overlay

public void setVisible (boolean visible)

Sets whether or not this ground overlay is visible given that the overlay is within the camera's viewport.

Parameters
visible True to set it visible

public void setZIndex (float zIndex)

Sets the z-index of this ground overlay. Higher z-indexed overlays draw on top of lower z-indexed overlays.

Parameters
zIndex The new z-index value for this ground overlay