From 47194defca3055f045c09f9a3ec288effe455d6b Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Fri, 29 Jul 2011 09:50:50 -0500 Subject: [PATCH] Add support for Subzones (1 tier) --- web/js/regions_Residence.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/web/js/regions_Residence.js b/web/js/regions_Residence.js index 2217d9ef..822e05d3 100644 --- a/web/js/regions_Residence.js +++ b/web/js/regions_Residence.js @@ -17,7 +17,17 @@ regionConstructors['Residence'] = function(dynmap, configuration) { }))); boxLayers.push(boxLayer); - }); + $.each(residence.Subzones, function(szname, subzone) { + $.each(subzone.Areas, function(name2, area2) { + var subzoneLayer = configuration.createBoxLayer(area2.X1, area2.X2, area2.Y1, area2.Y2, area2.Z1, area2.Z2); + subzoneLayer.bindPopup(configuration.createPopupContent(name2, $.extend(subzone, { + owners: { players: [subzone.Permissions.Owner] }, + flags: subzone.Permissions.AreaFlags + }))); + boxLayers.push(subzoneLayer); + }); + }); + }); } }); configuration.result(new L.LayerGroup(boxLayers));