Add minzoom setting to allow option to hide layer below specified zoom level
This commit is contained in:
parent
fc7f40c36b
commit
74ab9442bd
4
pom.xml
4
pom.xml
@ -56,13 +56,13 @@
|
||||
<dependency>
|
||||
<groupId>org.dynmap</groupId>
|
||||
<artifactId>dynmap-api</artifactId>
|
||||
<version>[0.25,)</version>
|
||||
<version>[0.28,)</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>[1.0.0-R1-SNAPSHOT,)</version>
|
||||
<version>[1.0.1-R1-SNAPSHOT,)</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -520,11 +520,18 @@ public class DynmapFactionsPlugin extends JavaPlugin {
|
||||
this.saveConfig(); /* Save updates, if needed */
|
||||
|
||||
/* Now, add marker set for mobs (make it transient) */
|
||||
set = markerapi.createMarkerSet("factions.markerset", cfg.getString("layer.name", "Factions"), null, false);
|
||||
set = markerapi.getMarkerSet("factions.markerset");
|
||||
if(set == null)
|
||||
set = markerapi.createMarkerSet("factions.markerset", cfg.getString("layer.name", "Factions"), null, false);
|
||||
else
|
||||
set.setMarkerSetLabel(cfg.getString("layer.name", "Factions"));
|
||||
if(set == null) {
|
||||
severe("Error creating marker set");
|
||||
return;
|
||||
}
|
||||
int minzoom = cfg.getInt("layer.minzoom", 0);
|
||||
if(minzoom > 0)
|
||||
set.setMinZoom(minzoom);
|
||||
set.setLayerPriority(cfg.getInt("layer.layerprio", 10));
|
||||
set.setHideByDefault(cfg.getBoolean("layer.hidebydefault", false));
|
||||
use3d = cfg.getBoolean("use3dregions", false);
|
||||
|
@ -10,6 +10,8 @@ layer:
|
||||
hidebydefault: false
|
||||
# ordering priority in layer menu (low goes before high - default is 0)
|
||||
layerprio: 2
|
||||
# (optional) set minimum zoom level before layer is visible (0 = defalt, always visible)
|
||||
minzoom: 0
|
||||
|
||||
# Format for popup - substitute values for macros
|
||||
infowindow: '<div class="infowindow"><span style="font-size:120%;">%regionname%</span><br />Flags<br /><span style="font-weight:bold;">%flags%</span></div>'
|
||||
|
Loading…
Reference in New Issue
Block a user