@JsType(isNative=true) public class TileLayer extends java.lang.Object implements ILayer
Modifier and Type | Method and Description |
---|---|
L |
addTo(Map map)
Adds the layer to the map.
|
L |
bringToBack()
Brings the tile layer to the bottom of all tile layers.
|
L |
bringToFront()
Brings the tile layer to the top of all tile layers.
|
static L |
clearAllEventListeners()
Clear all event listeners.
|
static L |
fire(java.lang.String type)
Fires an event of the specified type.
|
HTMLElement |
getContainer()
Returns the HTML element that contains the tiles for this layer.
|
static L |
off(java.lang.String type,
Function fn)
the listener will only get fired once and then removed.
|
static L |
on(java.lang.String type,
Function fn)
Adds a set of type/listener pairs
|
void |
onAdd(Map map)
Should contain code that creates DOM elements for the overlay, adds them to map panes where they should belong and puts listeners on relevant map events.
|
static L |
once(java.lang.String type,
Function fn)
Once.
|
void |
onRemove(Map map)
Should contain all clean up code that removes the overlay's elements from the DOM and removes listeners previously added in onAdd.
|
L |
redraw()
Causes the layer to clear all the tiles and request them again
|
L |
setOpacity(java.lang.Number opacity)
Changes the opacity of the tile layer.
|
L |
setUrl(java.lang.String urlTemplate)
Updates the layer's URL template and redraws it.
|
L |
setZIndex(java.lang.Number zIndex)
Sets the zIndex of the tile layer.
|
@JsMethod public L addTo(Map map)
map
- the map@JsMethod public L bringToFront()
@JsMethod public L bringToBack()
@JsMethod public L setOpacity(java.lang.Number opacity)
opacity
- the opacity@JsMethod public L setZIndex(java.lang.Number zIndex)
zIndex
- the z index@JsMethod public L redraw()
@JsMethod public L setUrl(java.lang.String urlTemplate)
urlTemplate
- the url template@JsMethod public HTMLElement getContainer()
@JsMethod public static L clearAllEventListeners()
@JsMethod public static L on(java.lang.String type, Function fn)
type
- the typefn
- the callback function@JsMethod public static L once(java.lang.String type, Function fn)
type
- the typefn
- the callback function@JsMethod public static L off(java.lang.String type, Function fn)
type
- the typefn
- the callback function@JsMethod public static L fire(java.lang.String type)
type
- the type@JsMethod public void onAdd(Map map)
ILayer