mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-24 19:25:15 +01:00
Add 'hidebydefault' option for Markers layers
This commit is contained in:
parent
771059bf5a
commit
9da159f842
@ -47,6 +47,8 @@ components:
|
||||
#showlabel: true
|
||||
# If set, enables support for using signs for markers
|
||||
#enablesigns: true
|
||||
# If set, make markers layer hidden by default
|
||||
#hidebydefault: true
|
||||
|
||||
- class: org.dynmap.ClientComponent
|
||||
type: chat
|
||||
|
@ -70,6 +70,7 @@ componentconstructors['markers'] = function(dynmap, configuration) {
|
||||
function createMarkerSet(set, ts) {
|
||||
set.layergroup = new L.LayerGroup();
|
||||
set.timestamp = ts;
|
||||
if(!configuration.hidebydefault)
|
||||
dynmap.map.addLayer(set.layergroup);
|
||||
dynmap.layercontrol.addOverlay(set.layergroup, set.label);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user