java.lang.Object | |
↳ | com.amazon.geo.mapsv2.model.TileOverlay |
Represents a set of images placed on top of the normal base map tiles. The
images can completely replace the standard map tiles. Alternatively,
transparent tiles can add features to the standard map. Obtain the images for
the TileOverlay
from the given TileProvider
.
Obtain a TileOverlay
by creating a TileOverlayOptions
object
with the initial properties and then passing it to
addTileOverlay(TileOverlayOptions)
.
You can change the properties of the TileOverlay
using the setter
methods after the TileOverlay
is created. All getter and setter
methods must be called on the main thread or an IllegalStateException
is thrown.
The TileProvider
must be set in the TileOverlayOptions
and
cannot be changed for an existing TileOverlay
. To change the
displayed tiles, you can either update your TileProvider
internally
and call clearTileCache()
, or call remove()
to remove the
existing TileOverlay
and then add another.
The world is projected with a Mercator projection. The map ranges from -180 to 180 degrees of longitude west to east. From north to south, the map is truncated at 85.05113 and -85.05113 degrees in order to make the map square.
The map world is divided into several square tiles that contain the map data. Low zoom levels show a small number of tiles and high zoom levels show many more tiles. For a zoom level N, the world is divided into 4N tiles arranged in a 2N x 2N grid. These tiles have x and y coordinates in the closed range [0, 2N - 1]. The tile in the top left (northwest) has the coordinate (0, 0) and the tile in the bottom right (southeast) has the coordinate (2N - 1, 2N - 1).
You can get the minimum zoom level with getMinZoomLevel()
and the maximum zoom level with getMaxZoomLevel()
. The map
downloads and renders only the tiles that overlap the screen for the current
zoom level.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public constructor.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Clears the tile cache.
| |||||||||||
Retrieves a boolean value indicating whether the tiles should fade in.
| |||||||||||
Gets the unique ID for this
TileOverlay . | |||||||||||
Gets the z-index of this
TileOverlay . | |||||||||||
Retrieves a boolean value indicating whether the
TileOverlay is
visible or hidden. | |||||||||||
Removes this
TileOverlay from the map. | |||||||||||
Sets whether tiles should fade in or display instantly with no fade
effect.
| |||||||||||
Sets the visibility of the
TileOverlay . | |||||||||||
Sets the z-index of the
TileOverlay . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public constructor. Instead of using this constructor, use
AmazonMap.addTileOverlay(TileOverlayOptions)
to create a
TileOverlay
.
Clears the tile cache. All tiles currently rendered are cleared from
the map. Request new tiles by querying the TileProvider
.
Retrieves a boolean value indicating whether the tiles should fade in.
true
to fade in the tiles, or false
to display
the tiles instantly with no fade effect.
Gets the unique ID for this TileOverlay
. The ID is unique for all
TileOverlay
objects currently added to the map.
TileOverlay
's ID as a String
.
Gets the z-index of this TileOverlay
. See
setZIndex(float)
for more information about the z-index.
TileOverlay
's z-index.
Retrieves a boolean value indicating whether the TileOverlay
is
visible or hidden.
true
if this TileOverlay
is visible, or
false
if it is hidden.
Removes this TileOverlay
from the map. After calling this method,
calling other methods on the object has no effect on the appearance of
the map
Sets whether tiles should fade in or display instantly with no fade effect.
fadeIn | true to fade in the tiles, or false to
display the tiles instantly with no fade effect.
|
---|
Sets the visibility of the TileOverlay
. If false
, the
TileOverlay
is hidden, but all state is preserved. The default
value is true
.
visible | true to make this TileOverlay visible, or
false to make it hidden.
|
---|
Sets the z-index of the TileOverlay
. Z-index determines the order
in which overlays are drawn. Overlays with higher indices are drawn over
overlays with lower indices. Overlays with the same z-index are drawn in
an arbitrary order.
Overlays that are affected by z-index include GroundOverlay
,
TileOverlay
, Circle
, Polyline
, and
Polygon
.
Marker
overlays are not affected by the z-index of other
overlays.
The default value is zero.
zIndex | The z-index. |
---|