Level

A top-level Layer containing Units and other graphical elements.

🚧

Deprecated. Level and the Levels API are deprecated in favor of Floor and the Floors API. Query floors with UnitMap.floors() instead.

šŸ“˜

Working with levels on a Unit MapĀ®.

See the LevelSelection API on how to select and manipulate levels.

Level.translate(x, y)

Move the Level by the given x and y in screen space. This method is chainable.

ArgumentsTypeDefault ValuesDescription
xNumberundefinedThe value on the x axis.
yNumberundefinedThe value on the y axis.

Level.show()

Display the given Level. This method is chainable.

Level.hide()

Hide the given Level. This method is chainable.

Level.opacity(opacity)

Set the opacity of the Level. This method is chainable.

Arguments

ArgumentsTypeDefault ValueDescription
opacityFloatundefinedA number value between 0 and 1, where 1 is opaque, 0.5 is 50% transparent, and 0 is fully transparent.

Level.markers()

Add or remove Marker objects on the Level.

Returns

A new MarkerCollection instance.

Level.tags()

Get the tags on the Level.

Returns

A new TagsCollection instance.