mapp.layer.formats.tiles()
This module defines the tiles format for map layers.
- Source
Methods
(inner) tiles(layer)
The function takes a layer object as input and performs the following steps:
- It sets default values for
layer.source
andlayer.projection
if they are not already defined. - It creates a parameter string (
layer.paramString
) using themapp.utils.paramString
function, passinglayer.params
as an argument. - It creates a new
ol.layer.Tile
object and assigns it tolayer.L
. The tile layer is configured with the following properties:source
: A new instance of the tile source based on layer.source. The source is created usingol.source[layer.source]
and is configured with the projection, url, and transition properties.layer
: The layer object itself, allowing access to layer properties within the tile layer.zIndex
: The z-index of the layer.
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
layer | Object | The layer object. Properties
|
- Source