Compare commits

...

2 Commits

Author SHA1 Message Date
c45f002f82
tweak trains and trainlines displayed zoom (#412) 2024-11-11 19:51:31 +01:00
e1c9bdb8bd
Show layer selector only if more that one layer (#411)
Co-authored-by: Pierre-Yves Rollo <dev@pyrollo.com>
2024-11-11 19:50:45 +01:00
3 changed files with 8 additions and 2 deletions

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",

View File

@ -71,7 +71,7 @@ export default L.LayerGroup.extend({
getMaxDisplayedZoom: function(){
return 10;
return 7;
},
createMarker: function(train){

View File

@ -58,6 +58,10 @@ export default AbstractGeoJsonOverlay.extend({
}
});
},
getMaxDisplayedZoom: function(){
return 4;
},
createGeoJson: function(objects){
var self = this;