mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-09-12 06:08:07 +02:00
Add customstyle settings for per-region style, nation style for Towny, lots for Residence
This commit is contained in:
parent
c37680b62c
commit
9564bd8a89
@ -65,6 +65,7 @@ components:
|
|||||||
# type: logo
|
# type: logo
|
||||||
# text: "Dynmap"
|
# text: "Dynmap"
|
||||||
# linkurl: "http://forums.bukkit.org/threads/dynmap.489/"
|
# linkurl: "http://forums.bukkit.org/threads/dynmap.489/"
|
||||||
|
|
||||||
#- class: org.dynmap.regions.RegionsComponent
|
#- class: org.dynmap.regions.RegionsComponent
|
||||||
# type: regions
|
# type: regions
|
||||||
# name: WorldGuard
|
# name: WorldGuard
|
||||||
@ -73,11 +74,9 @@ components:
|
|||||||
# basenode: regions
|
# basenode: regions
|
||||||
# use3dregions: true
|
# use3dregions: true
|
||||||
# regionstyle:
|
# regionstyle:
|
||||||
# stroke: true
|
# strokeColor: "#FF0000"
|
||||||
# color: "#FF0000"
|
# strokeOpacity: 0.8
|
||||||
# opacity: 0.8
|
# strokeWeight: 3
|
||||||
# weight: 3
|
|
||||||
# fill: true
|
|
||||||
# fillColor: "#FF0000"
|
# fillColor: "#FF0000"
|
||||||
# fillOpacity: 0.35
|
# fillOpacity: 0.35
|
||||||
# # Optional setting to limit which regions to show, by name - if commented out, all regions are shown
|
# # Optional setting to limit which regions to show, by name - if commented out, all regions are shown
|
||||||
@ -88,6 +87,11 @@ components:
|
|||||||
# hiddenregions:
|
# hiddenregions:
|
||||||
# - hiddenplace
|
# - hiddenplace
|
||||||
# - secretsite
|
# - secretsite
|
||||||
|
# # Optional per-region overrides for regionstyle (any defined replace those in regionstyle)
|
||||||
|
# customstyle:
|
||||||
|
# homebase:
|
||||||
|
# strokeColor: "#00FF00"
|
||||||
|
|
||||||
#- class: org.dynmap.regions.RegionsComponent
|
#- class: org.dynmap.regions.RegionsComponent
|
||||||
# type: regions
|
# type: regions
|
||||||
# name: Residence
|
# name: Residence
|
||||||
@ -110,11 +114,20 @@ components:
|
|||||||
# hiddenregions:
|
# hiddenregions:
|
||||||
# - hiddenplace
|
# - hiddenplace
|
||||||
# - secretsite
|
# - secretsite
|
||||||
|
# # Optional per-region overrides for regionstyle (any defined replace those in regionstyle)
|
||||||
|
# customstyle:
|
||||||
|
# homebase:
|
||||||
|
# strokeColor: "#00FF00"
|
||||||
|
# # Optional groups (subareas under a residence) overrides for regionstyle (any defined replace those in regionstyle)
|
||||||
|
# groupstyle:
|
||||||
|
# homebase:
|
||||||
|
# strokeColor: "#007F00"
|
||||||
|
|
||||||
#- class: org.dynmap.regions.RegionsComponent
|
#- class: org.dynmap.regions.RegionsComponent
|
||||||
# type: regions
|
# type: regions
|
||||||
# name: Towny
|
# name: Towny
|
||||||
# use3dregions: false
|
# use3dregions: false
|
||||||
# infowindow: '<div class="infowindow"><span style="font-size:120%;">%regionname%</span><br /> Mayor <span style="font-weight:bold;">%playerowners%</span><br /> Associates <span style="font-weight:bold;">%playermanagers%</span><br/>Flags<br /><span style="font-weight:bold;">%flags%</span></div>'
|
# infowindow: '<div class="infowindow"><span style="font-size:120%;">%regionname% (%nation%)</span><br /> Mayor <span style="font-weight:bold;">%playerowners%</span><br /> Associates <span style="font-weight:bold;">%playermanagers%</span><br/>Flags<br /><span style="font-weight:bold;">%flags%</span></div>'
|
||||||
# regionstyle:
|
# regionstyle:
|
||||||
# strokeColor: "#FF0000"
|
# strokeColor: "#FF0000"
|
||||||
# strokeOpacity: 0.8
|
# strokeOpacity: 0.8
|
||||||
@ -129,6 +142,15 @@ components:
|
|||||||
# hiddenregions:
|
# hiddenregions:
|
||||||
# - hiddenplace
|
# - hiddenplace
|
||||||
# - secretsite
|
# - secretsite
|
||||||
|
# # Optional per-town overrides for regionstyle (any defined replace those in regionstyle)
|
||||||
|
# customstyle:
|
||||||
|
# homebase:
|
||||||
|
# strokeColor: "#00FF00"
|
||||||
|
# # Optional per-nation overrides for regionstyle (any defined replace those in regionstyle)
|
||||||
|
# groupstyle:
|
||||||
|
# MyNation:
|
||||||
|
# strokeColor: "#007F00"
|
||||||
|
|
||||||
#- class: org.dynmap.TestComponent
|
#- class: org.dynmap.TestComponent
|
||||||
# stuff: "This is some configuration-value"
|
# stuff: "This is some configuration-value"
|
||||||
|
|
||||||
|
@ -5,71 +5,104 @@ componentconstructors['regions'] = function(dynmap, configuration) {
|
|||||||
// Compatibility with older configurations.
|
// Compatibility with older configurations.
|
||||||
if (configuration.regionstyle) {
|
if (configuration.regionstyle) {
|
||||||
configuration.regionstyle = $.extend({
|
configuration.regionstyle = $.extend({
|
||||||
stroke: (configuration.regionstyle.strokeOpacity > 0.0),
|
stroke: true,
|
||||||
color: configuration.regionstyle.strokeColor,
|
color: configuration.regionstyle.strokeColor,
|
||||||
opacity: configuration.regionstyle.strokeOpacity,
|
opacity: configuration.regionstyle.strokeOpacity || 0.01,
|
||||||
weight: configuration.regionstyle.strokeWeight,
|
weight: configuration.regionstyle.strokeWeight,
|
||||||
fill: (configuration.regionstyle.fillOpacity > 0.0),
|
fill: true,
|
||||||
smoothFactor: 0.0
|
smoothFactor: 0.0,
|
||||||
|
fillOpacity: configuration.regionstyle.fillOpacity || 0.01,
|
||||||
|
fillColor: configuration.regionstyle.fillColor
|
||||||
}, configuration.regionstyle);
|
}, configuration.regionstyle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getStyle(name, group) {
|
||||||
|
var style = $.extend({}, configuration.regionstyle);
|
||||||
|
if(configuration.groupstyle && group && configuration.groupstyle[group]) {
|
||||||
|
var cs = configuration.groupstyle[group];
|
||||||
|
if(cs.strokeColor)
|
||||||
|
style.color = cs.strokeColor;
|
||||||
|
if(cs.strokeOpacity)
|
||||||
|
style.opacity = cs.strokeOpacity;
|
||||||
|
if(cs.strokeWeight)
|
||||||
|
style.weight = cs.strokeWeight;
|
||||||
|
if(cs.fillOpacity)
|
||||||
|
style.fillOpacity = cs.fillOpacity;
|
||||||
|
if(cs.fillColor)
|
||||||
|
style.fillColor = cs.fillColor;
|
||||||
|
}
|
||||||
|
if(configuration.customstyle && name && configuration.customstyle[name]) {
|
||||||
|
var cs = configuration.customstyle[name];
|
||||||
|
if(cs.strokeColor)
|
||||||
|
style.color = cs.strokeColor;
|
||||||
|
if(cs.strokeOpacity)
|
||||||
|
style.opacity = cs.strokeOpacity;
|
||||||
|
if(cs.strokeWeight)
|
||||||
|
style.weight = cs.strokeWeight;
|
||||||
|
if(cs.fillOpacity)
|
||||||
|
style.fillOpacity = cs.fillOpacity;
|
||||||
|
if(cs.fillColor)
|
||||||
|
style.fillColor = cs.fillColor;
|
||||||
|
}
|
||||||
|
return style;
|
||||||
|
}
|
||||||
|
|
||||||
// Helper functions
|
// Helper functions
|
||||||
latlng = function(x, y, z) {
|
latlng = function(x, y, z) {
|
||||||
return dynmap.getProjection().fromLocationToLatLng(new Location(undefined, x,y,z));
|
return dynmap.getProjection().fromLocationToLatLng(new Location(undefined, x,y,z));
|
||||||
}
|
}
|
||||||
|
|
||||||
function create3DBoxLayer(maxx, minx, maxy, miny, maxz, minz) {
|
function create3DBoxLayer(maxx, minx, maxy, miny, maxz, minz, style) {
|
||||||
return new L.FeatureGroup([
|
return new L.FeatureGroup([
|
||||||
new L.Polygon([
|
new L.Polygon([
|
||||||
latlng(minx,miny,minz),
|
latlng(minx,miny,minz),
|
||||||
latlng(maxx,miny,minz),
|
latlng(maxx,miny,minz),
|
||||||
latlng(maxx,miny,maxz),
|
latlng(maxx,miny,maxz),
|
||||||
latlng(minx,miny,maxz)
|
latlng(minx,miny,maxz)
|
||||||
], configuration.regionstyle),
|
], style),
|
||||||
new L.Polygon([
|
new L.Polygon([
|
||||||
latlng(minx,maxy,minz),
|
latlng(minx,maxy,minz),
|
||||||
latlng(maxx,maxy,minz),
|
latlng(maxx,maxy,minz),
|
||||||
latlng(maxx,maxy,maxz),
|
latlng(maxx,maxy,maxz),
|
||||||
latlng(minx,maxy,maxz)
|
latlng(minx,maxy,maxz)
|
||||||
], configuration.regionstyle),
|
], style),
|
||||||
new L.Polygon([
|
new L.Polygon([
|
||||||
latlng(minx,miny,minz),
|
latlng(minx,miny,minz),
|
||||||
latlng(minx,maxy,minz),
|
latlng(minx,maxy,minz),
|
||||||
latlng(maxx,maxy,minz),
|
latlng(maxx,maxy,minz),
|
||||||
latlng(maxx,miny,minz)
|
latlng(maxx,miny,minz)
|
||||||
], configuration.regionstyle),
|
], style),
|
||||||
new L.Polygon([
|
new L.Polygon([
|
||||||
latlng(maxx,miny,minz),
|
latlng(maxx,miny,minz),
|
||||||
latlng(maxx,maxy,minz),
|
latlng(maxx,maxy,minz),
|
||||||
latlng(maxx,maxy,maxz),
|
latlng(maxx,maxy,maxz),
|
||||||
latlng(maxx,miny,maxz)
|
latlng(maxx,miny,maxz)
|
||||||
], configuration.regionstyle),
|
], style),
|
||||||
new L.Polygon([
|
new L.Polygon([
|
||||||
latlng(minx,miny,maxz),
|
latlng(minx,miny,maxz),
|
||||||
latlng(minx,maxy,maxz),
|
latlng(minx,maxy,maxz),
|
||||||
latlng(maxx,maxy,maxz),
|
latlng(maxx,maxy,maxz),
|
||||||
latlng(maxx,miny,maxz)
|
latlng(maxx,miny,maxz)
|
||||||
], configuration.regionstyle),
|
], style),
|
||||||
new L.Polygon([
|
new L.Polygon([
|
||||||
latlng(minx,miny,minz),
|
latlng(minx,miny,minz),
|
||||||
latlng(minx,maxy,minz),
|
latlng(minx,maxy,minz),
|
||||||
latlng(minx,maxy,maxz),
|
latlng(minx,maxy,maxz),
|
||||||
latlng(minx,miny,maxz)
|
latlng(minx,miny,maxz)
|
||||||
], configuration.regionstyle)
|
], style)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function create2DBoxLayer(maxx, minx, maxy, miny, maxz, minz) {
|
function create2DBoxLayer(maxx, minx, maxy, miny, maxz, minz, style) {
|
||||||
return new L.Polygon([
|
return new L.Polygon([
|
||||||
latlng(minx,64,minz),
|
latlng(minx,64,minz),
|
||||||
latlng(maxx,64,minz),
|
latlng(maxx,64,minz),
|
||||||
latlng(maxx,64,maxz),
|
latlng(maxx,64,maxz),
|
||||||
latlng(minx,64,maxz)
|
latlng(minx,64,maxz)
|
||||||
], configuration.regionstyle);
|
], style);
|
||||||
}
|
}
|
||||||
|
|
||||||
function create3DOutlineLayer(xarray, maxy, miny, zarray) {
|
function create3DOutlineLayer(xarray, maxy, miny, zarray, style) {
|
||||||
var toplist = [];
|
var toplist = [];
|
||||||
var botlist = [];
|
var botlist = [];
|
||||||
var i;
|
var i;
|
||||||
@ -84,21 +117,21 @@ componentconstructors['regions'] = function(dynmap, configuration) {
|
|||||||
sidelist[1] = botlist[i];
|
sidelist[1] = botlist[i];
|
||||||
sidelist[2] = botlist[(i+1)%xarray.length];
|
sidelist[2] = botlist[(i+1)%xarray.length];
|
||||||
sidelist[3] = toplist[(i+1)%xarray.length];
|
sidelist[3] = toplist[(i+1)%xarray.length];
|
||||||
polylist[i] = new L.Polygon(sidelist, configuration.regionstyle);
|
polylist[i] = new L.Polygon(sidelist, style);
|
||||||
}
|
}
|
||||||
polylist[xarray.length] = new L.Polygon(botlist, configuration.regionstyle);
|
polylist[xarray.length] = new L.Polygon(botlist, style);
|
||||||
polylist[xarray.length+1] = new L.Polygon(toplist, configuration.regionstyle);
|
polylist[xarray.length+1] = new L.Polygon(toplist, style);
|
||||||
|
|
||||||
return new L.FeatureGroup(polylist);
|
return new L.FeatureGroup(polylist);
|
||||||
}
|
}
|
||||||
|
|
||||||
function create2DOutlineLayer(xarray, maxy, miny, zarray) {
|
function create2DOutlineLayer(xarray, maxy, miny, zarray, style) {
|
||||||
var llist = [];
|
var llist = [];
|
||||||
var i;
|
var i;
|
||||||
for(i = 0; i < xarray.length; i++) {
|
for(i = 0; i < xarray.length; i++) {
|
||||||
llist[i] = latlng(xarray[i], 64, zarray[i]);
|
llist[i] = latlng(xarray[i], 64, zarray[i]);
|
||||||
}
|
}
|
||||||
return new L.Polygon(llist, configuration.regionstyle);
|
return new L.Polygon(llist, style);
|
||||||
}
|
}
|
||||||
|
|
||||||
function createPopupContent(name, region) {
|
function createPopupContent(name, region) {
|
||||||
@ -121,6 +154,7 @@ componentconstructors['regions'] = function(dynmap, configuration) {
|
|||||||
popup = popup.replace('%groupmembers%', join(members.groups));
|
popup = popup.replace('%groupmembers%', join(members.groups));
|
||||||
popup = popup.replace('%parent%', region.parent || "");
|
popup = popup.replace('%parent%', region.parent || "");
|
||||||
popup = popup.replace('%priority%', region.priority || "");
|
popup = popup.replace('%priority%', region.priority || "");
|
||||||
|
popup = popup.replace('%nation%', region.nation || "");
|
||||||
var regionflags = "";
|
var regionflags = "";
|
||||||
$.each(region.flags, function(name, value) {
|
$.each(region.flags, function(name, value) {
|
||||||
regionflags = regionflags + "<span>" + name + ": " + value + "</span><br>";
|
regionflags = regionflags + "<span>" + name + ": " + value + "</span><br>";
|
||||||
@ -151,6 +185,7 @@ componentconstructors['regions'] = function(dynmap, configuration) {
|
|||||||
createPopupContent: createPopupContent,
|
createPopupContent: createPopupContent,
|
||||||
createBoxLayer: configuration.use3dregions ? create3DBoxLayer : create2DBoxLayer,
|
createBoxLayer: configuration.use3dregions ? create3DBoxLayer : create2DBoxLayer,
|
||||||
createOutlineLayer: configuration.use3dregions ? create3DOutlineLayer : create2DOutlineLayer,
|
createOutlineLayer: configuration.use3dregions ? create3DOutlineLayer : create2DOutlineLayer,
|
||||||
|
getStyle: getStyle,
|
||||||
result: function(regionsLayer) {
|
result: function(regionsLayer) {
|
||||||
activeLayer = regionsLayer;
|
activeLayer = regionsLayer;
|
||||||
dynmap.map.addLayer(activeLayer);
|
dynmap.map.addLayer(activeLayer);
|
||||||
|
@ -9,7 +9,7 @@ regionConstructors['Residence'] = function(dynmap, configuration) {
|
|||||||
$.each(data, function(name, residence) {
|
$.each(data, function(name, residence) {
|
||||||
if(configuration.worldName == residence.Permissions.World) {
|
if(configuration.worldName == residence.Permissions.World) {
|
||||||
$.each(residence.Areas, function(aname, area) {
|
$.each(residence.Areas, function(aname, area) {
|
||||||
var boxLayer = configuration.createBoxLayer(area.X1, area.X2, area.Y1, area.Y2, area.Z1, area.Z2);
|
var boxLayer = configuration.createBoxLayer(area.X1, area.X2, area.Y1, area.Y2, area.Z1, area.Z2, configuration.getStyle(name));
|
||||||
|
|
||||||
boxLayer.bindPopup(configuration.createPopupContent(name, $.extend(residence, {
|
boxLayer.bindPopup(configuration.createPopupContent(name, $.extend(residence, {
|
||||||
owners: { players: [residence.Permissions.Owner] },
|
owners: { players: [residence.Permissions.Owner] },
|
||||||
@ -20,7 +20,7 @@ regionConstructors['Residence'] = function(dynmap, configuration) {
|
|||||||
});
|
});
|
||||||
$.each(residence.Subzones, function(szname, subzone) {
|
$.each(residence.Subzones, function(szname, subzone) {
|
||||||
$.each(subzone.Areas, function(name2, area2) {
|
$.each(subzone.Areas, function(name2, area2) {
|
||||||
var subzoneLayer = configuration.createBoxLayer(area2.X1, area2.X2, area2.Y1, area2.Y2, area2.Z1, area2.Z2);
|
var subzoneLayer = configuration.createBoxLayer(area2.X1, area2.X2, area2.Y1, area2.Y2, area2.Z1, area2.Z2, configuration.getStyle(name+"."+szname, name));
|
||||||
subzoneLayer.bindPopup(configuration.createPopupContent(name + '.' + szname, $.extend(subzone, {
|
subzoneLayer.bindPopup(configuration.createPopupContent(name + '.' + szname, $.extend(subzone, {
|
||||||
owners: { players: [subzone.Permissions.Owner] },
|
owners: { players: [subzone.Permissions.Owner] },
|
||||||
flags: subzone.Permissions.AreaFlags
|
flags: subzone.Permissions.AreaFlags
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
regionConstructors['Towny'] = function(dynmap, configuration) {
|
regionConstructors['Towny'] = function(dynmap, configuration) {
|
||||||
// Helper function.
|
// Helper function.
|
||||||
function createOutlineFromRegion(region, outCreator) {
|
function createOutlineFromRegion(name, region, outCreator) {
|
||||||
var xarray = [];
|
var xarray = [];
|
||||||
var zarray = [];
|
var zarray = [];
|
||||||
if(region.points) {
|
if(region.points) {
|
||||||
@ -13,14 +13,14 @@ regionConstructors['Towny'] = function(dynmap, configuration) {
|
|||||||
var ymin = 64;
|
var ymin = 64;
|
||||||
var ymax = 65;
|
var ymax = 65;
|
||||||
|
|
||||||
return outCreator(xarray, ymax, ymin, zarray);
|
return outCreator(xarray, ymax, ymin, zarray, configuration.getStyle(name, region.nation));
|
||||||
}
|
}
|
||||||
|
|
||||||
var regionFile = 'towny_'+configuration.worldName+'.json';
|
var regionFile = 'towny_'+configuration.worldName+'.json';
|
||||||
$.getJSON('standalone/'+regionFile, function(data) {
|
$.getJSON('standalone/'+regionFile, function(data) {
|
||||||
var boxLayers = [];
|
var boxLayers = [];
|
||||||
$.each(data, function(name, region) {
|
$.each(data, function(name, region) {
|
||||||
var outLayer = createOutlineFromRegion(region, configuration.createOutlineLayer);
|
var outLayer = createOutlineFromRegion(name, region, configuration.createOutlineLayer);
|
||||||
if (outLayer) {
|
if (outLayer) {
|
||||||
outLayer.bindPopup(configuration.createPopupContent(name,
|
outLayer.bindPopup(configuration.createPopupContent(name,
|
||||||
$.extend(region, {
|
$.extend(region, {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
regionConstructors['WorldGuard'] = function(dynmap, configuration) {
|
regionConstructors['WorldGuard'] = function(dynmap, configuration) {
|
||||||
// Helper function.
|
// Helper function.
|
||||||
function createBoxFromRegion(region, boxCreator) {
|
function createBoxFromRegion(name, region, boxCreator) {
|
||||||
function ArrayMax( array ) {
|
function ArrayMax( array ) {
|
||||||
return Math.max.apply( Math, array );
|
return Math.max.apply( Math, array );
|
||||||
}
|
}
|
||||||
@ -11,16 +11,16 @@ regionConstructors['WorldGuard'] = function(dynmap, configuration) {
|
|||||||
var i;
|
var i;
|
||||||
var xs = region.points.map(function(p) { return p.x; });
|
var xs = region.points.map(function(p) { return p.x; });
|
||||||
var zs = region.points.map(function(p) { return p.z; });
|
var zs = region.points.map(function(p) { return p.z; });
|
||||||
return boxCreator(ArrayMax(xs), ArrayMin(xs), region['max-y'], region['min-y'], ArrayMax(zs), ArrayMin(zs));
|
return boxCreator(ArrayMax(xs), ArrayMin(xs), region['max-y'], region['min-y'], ArrayMax(zs), ArrayMin(zs), configuration.getStyle(name));
|
||||||
}
|
}
|
||||||
if(!region.min || !region.max)
|
if(!region.min || !region.max)
|
||||||
return null;
|
return null;
|
||||||
if(region.max.y <= region.min.y)
|
if(region.max.y <= region.min.y)
|
||||||
region.min.y = region.max.y - 1;
|
region.min.y = region.max.y - 1;
|
||||||
return boxCreator(region.max.x, region.min.x, region.max.y, region.min.y, region.max.z, region.min.z);
|
return boxCreator(region.max.x, region.min.x, region.max.y, region.min.y, region.max.z, region.min.z, configuration.getStyle(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
function createOutlineFromRegion(region, outCreator) {
|
function createOutlineFromRegion(name, region, outCreator) {
|
||||||
var xarray = [];
|
var xarray = [];
|
||||||
var zarray = [];
|
var zarray = [];
|
||||||
if(region.points) {
|
if(region.points) {
|
||||||
@ -38,7 +38,7 @@ regionConstructors['WorldGuard'] = function(dynmap, configuration) {
|
|||||||
ymin = region['min-y'];
|
ymin = region['min-y'];
|
||||||
if(ymax < ymin) ymax = ymin;
|
if(ymax < ymin) ymax = ymin;
|
||||||
|
|
||||||
return outCreator(xarray, ymax, ymin, zarray);
|
return outCreator(xarray, ymax, ymin, zarray, configuration.getStyle(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
var regionFile = configuration.filename.substr(0, configuration.filename.lastIndexOf('.'));
|
var regionFile = configuration.filename.substr(0, configuration.filename.lastIndexOf('.'));
|
||||||
@ -48,7 +48,7 @@ regionConstructors['WorldGuard'] = function(dynmap, configuration) {
|
|||||||
$.each(data, function(name, region) {
|
$.each(data, function(name, region) {
|
||||||
// Only handle cuboids for the moment (therefore skipping 'global')
|
// Only handle cuboids for the moment (therefore skipping 'global')
|
||||||
if (region.type === 'cuboid') {
|
if (region.type === 'cuboid') {
|
||||||
var boxLayer = createBoxFromRegion(region, configuration.createBoxLayer);
|
var boxLayer = createBoxFromRegion(name, region, configuration.createBoxLayer);
|
||||||
// Skip errorous regions.
|
// Skip errorous regions.
|
||||||
if (boxLayer) {
|
if (boxLayer) {
|
||||||
boxLayer.bindPopup(configuration.createPopupContent(name, region));
|
boxLayer.bindPopup(configuration.createPopupContent(name, region));
|
||||||
@ -57,7 +57,7 @@ regionConstructors['WorldGuard'] = function(dynmap, configuration) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(region.type === 'poly2d') {
|
else if(region.type === 'poly2d') {
|
||||||
var outLayer = createOutlineFromRegion(region, configuration.createOutlineLayer);
|
var outLayer = createOutlineFromRegion(name, region, configuration.createOutlineLayer);
|
||||||
if (outLayer) {
|
if (outLayer) {
|
||||||
outLayer.bindPopup(configuration.createPopupContent(name, region));
|
outLayer.bindPopup(configuration.createPopupContent(name, region));
|
||||||
boxLayers.push(outLayer);
|
boxLayers.push(outLayer);
|
||||||
|
Loading…
Reference in New Issue
Block a user