1
0
forked from MTSR/mapserver

Show layer selector only if more that one layer

This commit is contained in:
Pierre-Yves Rollo 2019-11-25 10:15:15 +01:00 committed by Александр Авдеев
parent 05bbed786c
commit 0f82ec0896

View File

@ -7,9 +7,11 @@ function onchange(e){
m.route.set("/map/:layerId/:zoom/:lon/:lat", params);
}
export default {
view: function(){
// Display layer selector only if there is choice
if (LayerManager.layers.length <= 1)
return null;
const layers = LayerManager.layers.map(layer => m(
"option",