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>
|
<dependency>
|
||||||
<groupId>org.dynmap</groupId>
|
<groupId>org.dynmap</groupId>
|
||||||
<artifactId>dynmap-api</artifactId>
|
<artifactId>dynmap-api</artifactId>
|
||||||
<version>[0.25,)</version>
|
<version>[0.28,)</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
<artifactId>bukkit</artifactId>
|
<artifactId>bukkit</artifactId>
|
||||||
<version>[1.0.0-R1-SNAPSHOT,)</version>
|
<version>[1.0.1-R1-SNAPSHOT,)</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -520,11 +520,18 @@ public class DynmapFactionsPlugin extends JavaPlugin {
|
|||||||
this.saveConfig(); /* Save updates, if needed */
|
this.saveConfig(); /* Save updates, if needed */
|
||||||
|
|
||||||
/* Now, add marker set for mobs (make it transient) */
|
/* 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) {
|
if(set == null) {
|
||||||
severe("Error creating marker set");
|
severe("Error creating marker set");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
int minzoom = cfg.getInt("layer.minzoom", 0);
|
||||||
|
if(minzoom > 0)
|
||||||
|
set.setMinZoom(minzoom);
|
||||||
set.setLayerPriority(cfg.getInt("layer.layerprio", 10));
|
set.setLayerPriority(cfg.getInt("layer.layerprio", 10));
|
||||||
set.setHideByDefault(cfg.getBoolean("layer.hidebydefault", false));
|
set.setHideByDefault(cfg.getBoolean("layer.hidebydefault", false));
|
||||||
use3d = cfg.getBoolean("use3dregions", false);
|
use3d = cfg.getBoolean("use3dregions", false);
|
||||||
|
@ -10,7 +10,9 @@ layer:
|
|||||||
hidebydefault: false
|
hidebydefault: false
|
||||||
# ordering priority in layer menu (low goes before high - default is 0)
|
# ordering priority in layer menu (low goes before high - default is 0)
|
||||||
layerprio: 2
|
layerprio: 2
|
||||||
|
# (optional) set minimum zoom level before layer is visible (0 = defalt, always visible)
|
||||||
|
minzoom: 0
|
||||||
|
|
||||||
# Format for popup - substitute values for macros
|
# 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>'
|
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