目录

TileOverlay

Class Info

public final class TileOverlay

Represents a tile overlay. A tile overlay is a set of images to be displayed on a map. It can be transparent and enable you to add new functions to an existing map. An instance of this type will be returned when the addTileOverlay method in the HuaweiMap class is called.

Public Method Summary

Qualifier and Type

Method Name and Description

void

clearTileCache()

Clears the cache of a tile overlay.

void

remove()

Removes a tile overlay from a map.

void

setFadeIn(boolean fadeIn)

Sets whether a tile overlay fades in.

void

setTransparency(float transparency)

Sets the transparency of a tile overlay.

void

setVisible(boolean visible)

Sets whether a tile overlay is visible.

void

setZIndex(float zIndex)

Sets the z-index of a tile overlay.

Public Methods

[h2]clearTileCache

Method

public void clearTileCache()

Clears the cache of a tile overlay.

[h2]remove

Method

public void remove()

Removes a tile overlay from a map.

[h2]setFadeIn

Method

public void setFadeIn(boolean fadeIn)

Sets whether a tile overlay fades in.

Parameters

Name

Description

fadeIn

Indicates whether a tile overlay fades in.

  • true: yes
  • false: no

The default value is true.

[h2]setTransparency

Method

public void setTransparency(float transparency)

Sets the transparency of a tile overlay.

Parameters

Name

Description

transparency

Transparency of a tile overlay. The value ranges from 0 to 1.

  • 0: opaque
  • 1: transparent

The default value is 0.

[h2]setVisible

Method

public void setVisible(boolean visible)

Sets whether a tile overlay is visible. If the tile overlay is invisible, it will not be drawn but all other states will be preserved. By default, a tile overlay is visible.

Parameters

Name

Description

visible

Indicates whether a tile overlay is visible.

  • true: yes
  • false: no

The default value is true.

[h2]setZIndex

Method

public void setZIndex(float zIndex)

Sets the z-index of a tile overlay. The z-index indicates the overlapping order of a tile overlay. A tile overlay with a larger z-index overlaps that with a smaller z-index. Tile overlays with the same z-index overlap each other by the order in which they are added.

Parameters

Name

Description

zIndex

Z-index, which indicates the overlapping order of a tile overlay. By default, the z-index is 0.