Skip to content

Commit

Permalink
Use a variable to make explicit max number of shown layers
Browse files Browse the repository at this point in the history
  • Loading branch information
yohanboniface committed Dec 15, 2023
1 parent 49c17d6 commit 3ffa298
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion umap/static/umap/js/umap.controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
Expand Down

0 comments on commit 3ffa298

Please sign in to comment.