Use a variable to make explicit max number of shown layers
This commit is contained in:
parent
49c17d6fd1
commit
3ffa29802e
1 changed files with 2 additions and 1 deletions
|
@ -1189,7 +1189,8 @@ L.U.TileLayerControl = L.Control.IconLayers.extend({
|
|||
icon: L.Util.template(layer.options.url_template, map.demoTileInfos),
|
||||
})
|
||||
})
|
||||
L.Control.IconLayers.prototype.initialize.call(this, layers.slice(0, 10), {
|
||||
const maxShown = 10
|
||||
L.Control.IconLayers.prototype.initialize.call(this, layers.slice(0, maxShown), {
|
||||
position: 'topleft',
|
||||
manageLayers: false
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue