TileLayer
This class represents an abstract layer of an map.
Table of Contents
- $id : int|null
- Unique ID of the layer.
- $map : Map|null
- The map object, which holds this layer.
- $name : string|null
- The name of the layer.
- $offsetX : float
- Horizontal offset for this layer in pixels. Defaults to 0.
- $offsetY : float
- Vertical offset for this layer in pixels. Defaults to 0.
- $opacity : float|null
- The opacity of the layer as a value from 0 to 1.
- $tintColor : string|null
- A color that is multiplied with any tiles drawn by this layer in #AARRGGBB or #RRGGBB format.
- $visible : bool
- Whether the layer is shown (1) or hidden (0).
- getId() : int|null
- getMap() : Map|null
- getName() : string|null
- getOffsetX() : float
- getOffsetY() : float
- getOpacity() : float|null
- getTintColor() : string|null
- isVisible() : bool
- setId() : TileLayer
- setMap() : TileLayer
- setName() : TileLayer
- setOffsetX() : TileLayer
- setOffsetY() : TileLayer
- setOpacity() : TileLayer
- setTintColor() : TileLayer
- setVisible() : TileLayer
Properties
$id
Unique ID of the layer.
private
int|null
$id
= null
Tags
$map
The map object, which holds this layer.
private
Map|null
$map
Tags
$name
The name of the layer.
private
string|null
$name
= null
Tags
$offsetX
Horizontal offset for this layer in pixels. Defaults to 0.
private
float
$offsetX
= 0.0
Tags
$offsetY
Vertical offset for this layer in pixels. Defaults to 0.
private
float
$offsetY
= 0.0
Tags
$opacity
The opacity of the layer as a value from 0 to 1.
private
float|null
$opacity
= 1.0
Tags
$tintColor
A color that is multiplied with any tiles drawn by this layer in #AARRGGBB or #RRGGBB format.
private
string|null
$tintColor
= null
Tags
$visible
Whether the layer is shown (1) or hidden (0).
private
bool
$visible
= true
Tags
Methods
getId()
public
getId() : int|null
Return values
int|null —getMap()
public
getMap() : Map|null
Return values
Map|null —getName()
public
getName() : string|null
Return values
string|null —getOffsetX()
public
getOffsetX() : float
Return values
float —getOffsetY()
public
getOffsetY() : float
Return values
float —getOpacity()
public
getOpacity() : float|null
Return values
float|null —getTintColor()
public
getTintColor() : string|null
Return values
string|null —isVisible()
public
isVisible() : bool
Return values
bool —setId()
public
setId(int|null $id) : TileLayer
Parameters
- $id : int|null
Return values
TileLayer —setMap()
public
setMap(Map|null $map) : TileLayer
Parameters
- $map : Map|null
Return values
TileLayer —setName()
public
setName(string|null $name) : TileLayer
Parameters
- $name : string|null
Return values
TileLayer —setOffsetX()
public
setOffsetX(float $offsetX) : TileLayer
Parameters
- $offsetX : float
Return values
TileLayer —setOffsetY()
public
setOffsetY(float $offsetY) : TileLayer
Parameters
- $offsetY : float
Return values
TileLayer —setOpacity()
public
setOpacity(float|null $opacity) : TileLayer
Parameters
- $opacity : float|null
Return values
TileLayer —setTintColor()
public
setTintColor(string|null $tintColor) : TileLayer
Parameters
- $tintColor : string|null
Return values
TileLayer —setVisible()
public
setVisible(bool $visible) : TileLayer
Parameters
- $visible : bool