mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-12-01 06:33:38 +01:00
Add 'hidebydefault' option for Markers layers
This commit is contained in:
parent
21c68fa1b2
commit
89f63a9db2
@ -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