From 7208e03ce50b090f6cb779f80881ba830392b6fa Mon Sep 17 00:00:00 2001 From: Orestis Moresis Date: Fri, 24 Feb 2023 12:14:48 +0200 Subject: [PATCH] changes in legends, style layertree, bug fixes, legend toggle in context menu --- public/css/pickletree.css | 3 + public/img/legends/HABT.png | Bin 0 -> 8121 bytes public/img/legends/mediseh_cora.png | Bin 0 -> 1375 bytes public/img/legends/mediseh_maerl.png | Bin 0 -> 1375 bytes public/img/legends/mediseh_posidonia.png | Bin 0 -> 1375 bytes .../{an_status.png => wfd_an_status_.png} | Bin .../{bmi_status.png => wfd_bmi_status_.png} | Bin .../{chem_status.png => wfd_chem_status_.png} | Bin .../{chla_status.png => wfd_chla_status_.png} | Bin .../{eco_status.png => wfd_eco_status_.png} | Bin .../{ma_status.png => wfd_ma_status_.png} | Bin .../{pcqi_status.png => wfd_pcqi_status_.png} | Bin public/js/extras.js | 101 +++++++++-------- public/js/layers.js | 4 +- public/js/treeview.js | 105 +++++++++--------- 15 files changed, 107 insertions(+), 106 deletions(-) create mode 100644 public/img/legends/HABT.png create mode 100644 public/img/legends/mediseh_cora.png create mode 100644 public/img/legends/mediseh_maerl.png create mode 100644 public/img/legends/mediseh_posidonia.png rename public/img/legends/{an_status.png => wfd_an_status_.png} (100%) rename public/img/legends/{bmi_status.png => wfd_bmi_status_.png} (100%) rename public/img/legends/{chem_status.png => wfd_chem_status_.png} (100%) rename public/img/legends/{chla_status.png => wfd_chla_status_.png} (100%) rename public/img/legends/{eco_status.png => wfd_eco_status_.png} (100%) rename public/img/legends/{ma_status.png => wfd_ma_status_.png} (100%) rename public/img/legends/{pcqi_status.png => wfd_pcqi_status_.png} (100%) diff --git a/public/css/pickletree.css b/public/css/pickletree.css index 8f3863f..bdba3f9 100644 --- a/public/css/pickletree.css +++ b/public/css/pickletree.css @@ -6,6 +6,8 @@ width: 30px; height: 18px; margin: 0; + padding-inline: 15px; + margin-right: 5px; } .ptree .switch input { @@ -137,6 +139,7 @@ display: flex; align-items: baseline; cursor: pointer; + white-space: pre; } .ptreemenuCont span i { diff --git a/public/img/legends/HABT.png b/public/img/legends/HABT.png new file mode 100644 index 0000000000000000000000000000000000000000..aa1a621731a5d42ff712b376964bb9cbb10478f2 GIT binary patch literal 8121 zcma)BXIN9&x(=W)>QEd6MnIx6$`MplgiwU2G#v{nA|fRy3Q~j8TQ-UXsWOg=hN3}b zq>2a;2n1melmv{5G$BMZL_!FV&^GMsyMo8_%(-*UeeTcfvUb*5-`l=*?a)Dc#ig1{ zF&K>E-aR%)Fc=vL1|xg?2U&3C$9t;U7z{Rkug$Kbkv)Pw{BPoyaq4L8O>rjmOkqu(So@X0giK)q>1XND5uieqLfa9lLzkQ4FRP;Cp z*@MyMHmYC}Ntm>260C%yJ8`B3V*@c?OPo7I#8t`Z*-)7P8IJd%&@(qGvP4wu?7XL4 z)~cTnk;fzU=GCyh9oi9LgB~e8C~mA`q5On&I^2tc=CavVL#=wBZ_j>#)NiX2`i5># zMHLLUuG=24^Yk5S6K-qzAwrr@N9!x)4Z(-RKA$YmtWP@}Bt>Y*PZh4RXHp{%zm51t1sUI;ZV!!<@1!pqAHwa(A9kYJLZZ#`Hjo*d z?5OIMho@KPWGZbo!#mx)V{#20xXvTGZd(nvvhcwT`J4wao?_hTQz1d>Q1FZkG?Z_! zQ>@W;mz+oUTWWMJl zUY}d9%Opzf-u%j~JyRR>5c6>b(i|?DA~w=^&W+1xrf_Lpxjjy()ehU@6D5Xi+o@l< zo7B5VAvfCEU3KXB+>QdH-W!B_njQmnJa!Qohdz%?{#p=dP_j?a@X4qPv=!F9v7|6e zWMTt#sC1AV6%EHmd5|rR*qDE(AgK4#rF2aX&s-j~4@Vqwfr88Z@wb05rq%c6K`(;( zb9kk9j~kXagQ12lIh+8)|BUbn9MvdWzsOzUnhd#ko(6&;+y0mNp>TVKp|$*K*#B5~ zFs?L42cu<&mi5snSQW&Pf(~0yu%6d=_;T`eE1L2#N7eI&^asvJiGnr#R7C$7$*9VR z2ooI()Q{(}ACR5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1sqbXV~iA9iflOBcHHY>>^W3xHPCc_top38dSr1`8?!L-SN&26a1?< zf9Kbr#`zcl#ZN1q?CfmOy!eTa7?Lb{qmDR*r6VkMWp&|+U%{EpDulV5t&Uimf00Q` zlN>c$PMEhnKja1pPL)dLmj#E4^WRPy&92O3EZRq^UT^HqQFU{dJe1L1j^F}ImI-8} rO*(Mc77piRkc&x`*9ivT`) literal 0 HcmV?d00001 diff --git a/public/img/legends/mediseh_cora.png b/public/img/legends/mediseh_cora.png new file mode 100644 index 0000000000000000000000000000000000000000..1ff877675586c1355c344be06f544123d15d74e0 GIT binary patch literal 1375 zcmbW1|2NZn9LGO*S*xGft+#gQ-3jnBBHW-D52U0-sp z#JLA4yIQVJj9D%#)xzB<4Z}DcCYgzhtliJL=i#^k(NjR z01U%IgQFojLwSOLL3J;@*c|}i4q?FoG2rOOJH${@hDF~s`WCpX$K8p=lf>FT4vfyO zpQQUU=)6b%qAA>dxZMRh6C}RHE8hHooMp z^mTaRJxkM#i9==;D$MKxZSB*7kE&oIMb~d%e)VVp28@b`w8{*}-?sw_RW+Ck;lXuV zM~Mdy@e6IQ=sx4Cy`2OJTR!gR*9V_PbdxmNBvrz$9rJ0Xh}4(E219Et?H6#>UUl4E z4RRs7b0tZ=%EjbHcwZ9WSRow7(1Y)b)TXM5l5vV!o!qlxWc%14Jm_12rae2T`bgyg z?E*RblSBS^U&ucDn>M?(TECYUmxBwg8v3zHMP!${YOvwDo%Mq)IA>OgDE-atG2mo-);x-3^5W;*h)L|l1D zf;CowCHB^4G+I^a%vx_^SJPrYhnipOcec_dqkcuoG8Ci?ni>i|j67?=UB9=dqHGbJ z>GjJ2Wt(+{=XhII9y#+L(#zwSbCh&qV6<8M)!S9&H$+y)Q%RONe>AthK4DHCjyhdJ zn~OTA0v|X%N=7-?0Gi*w69O8~EDda`)^8Sdxp1Q#4SZDuLCwy*b=cI{7*wn*p)r~= zg}Ur_u?iZCwhIC9S`iw!G-v}Ei-|Vjnc1?jW22+#9(UxKSy@>eOR^hmsjI7t(0Klg zOKKgDhi=f6mX=B+l6PVWmP{sxt7S47%dbhzWWwi}<54lDRAv z@J6`HuNtpRjE<&_Avt|z^VwMg>$(&H8*T8_NVpSpOhjzf{%W^WsAhKS`psdJ&!Olk zhB9al(-}bz44}9}F-}AX7!iWwf*NGrsZ*l&IppTIo12>*9UbfIG>e2tW;~Jj69!{} zWX8qCL0xATmy=*!ECFLZ@cK1FVfY5*a=CK3JT^A=fZ!`~)3Se$L!e9jEv?z;y5H@2h5#b8|h=XrrqmB*oj|;Rpf&Yrm`MygW0HL^8=4 z|M2Iz<~VMzVs38kSbV&jBh>`WU@%$TxMS_mW&fA-7**f}`)Y`a=+m%XEA8#&?rwiE zr*;LlgymLGPfzptUKSHkY)@}*N@5~sp&)27`W|VmPh0HPkP=BHQK^Q)<<&Kx(>FPs zBK-xfx3siKrPBHvU#Kn=WTp6!yZb3Zhl8(;F0AJnd}P9W?kA^2h73HrZZDX1p^ literal 0 HcmV?d00001 diff --git a/public/img/legends/mediseh_maerl.png b/public/img/legends/mediseh_maerl.png new file mode 100644 index 0000000000000000000000000000000000000000..1ff877675586c1355c344be06f544123d15d74e0 GIT binary patch literal 1375 zcmbW1|2NZn9LGO*S*xGft+#gQ-3jnBBHW-D52U0-sp z#JLA4yIQVJj9D%#)xzB<4Z}DcCYgzhtliJL=i#^k(NjR z01U%IgQFojLwSOLL3J;@*c|}i4q?FoG2rOOJH${@hDF~s`WCpX$K8p=lf>FT4vfyO zpQQUU=)6b%qAA>dxZMRh6C}RHE8hHooMp z^mTaRJxkM#i9==;D$MKxZSB*7kE&oIMb~d%e)VVp28@b`w8{*}-?sw_RW+Ck;lXuV zM~Mdy@e6IQ=sx4Cy`2OJTR!gR*9V_PbdxmNBvrz$9rJ0Xh}4(E219Et?H6#>UUl4E z4RRs7b0tZ=%EjbHcwZ9WSRow7(1Y)b)TXM5l5vV!o!qlxWc%14Jm_12rae2T`bgyg z?E*RblSBS^U&ucDn>M?(TECYUmxBwg8v3zHMP!${YOvwDo%Mq)IA>OgDE-atG2mo-);x-3^5W;*h)L|l1D zf;CowCHB^4G+I^a%vx_^SJPrYhnipOcec_dqkcuoG8Ci?ni>i|j67?=UB9=dqHGbJ z>GjJ2Wt(+{=XhII9y#+L(#zwSbCh&qV6<8M)!S9&H$+y)Q%RONe>AthK4DHCjyhdJ zn~OTA0v|X%N=7-?0Gi*w69O8~EDda`)^8Sdxp1Q#4SZDuLCwy*b=cI{7*wn*p)r~= zg}Ur_u?iZCwhIC9S`iw!G-v}Ei-|Vjnc1?jW22+#9(UxKSy@>eOR^hmsjI7t(0Klg zOKKgDhi=f6mX=B+l6PVWmP{sxt7S47%dbhzWWwi}<54lDRAv z@J6`HuNtpRjE<&_Avt|z^VwMg>$(&H8*T8_NVpSpOhjzf{%W^WsAhKS`psdJ&!Olk zhB9al(-}bz44}9}F-}AX7!iWwf*NGrsZ*l&IppTIo12>*9UbfIG>e2tW;~Jj69!{} zWX8qCL0xATmy=*!ECFLZ@cK1FVfY5*a=CK3JT^A=fZ!`~)3Se$L!e9jEv?z;y5H@2h5#b8|h=XrrqmB*oj|;Rpf&Yrm`MygW0HL^8=4 z|M2Iz<~VMzVs38kSbV&jBh>`WU@%$TxMS_mW&fA-7**f}`)Y`a=+m%XEA8#&?rwiE zr*;LlgymLGPfzptUKSHkY)@}*N@5~sp&)27`W|VmPh0HPkP=BHQK^Q)<<&Kx(>FPs zBK-xfx3siKrPBHvU#Kn=WTp6!yZb3Zhl8(;F0AJnd}P9W?kA^2h73HrZZDX1p^ literal 0 HcmV?d00001 diff --git a/public/img/legends/mediseh_posidonia.png b/public/img/legends/mediseh_posidonia.png new file mode 100644 index 0000000000000000000000000000000000000000..1ff877675586c1355c344be06f544123d15d74e0 GIT binary patch literal 1375 zcmbW1|2NZn9LGO*S*xGft+#gQ-3jnBBHW-D52U0-sp z#JLA4yIQVJj9D%#)xzB<4Z}DcCYgzhtliJL=i#^k(NjR z01U%IgQFojLwSOLL3J;@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)<<&Kx(>FPs zBK-xfx3siKrPBHvU#Kn=WTp6!yZb3Zhl8(;F0AJnd}P9W?kA^2h73HrZZDX1p^ literal 0 HcmV?d00001 diff --git a/public/img/legends/an_status.png b/public/img/legends/wfd_an_status_.png similarity index 100% rename from public/img/legends/an_status.png rename to public/img/legends/wfd_an_status_.png diff --git a/public/img/legends/bmi_status.png b/public/img/legends/wfd_bmi_status_.png similarity index 100% rename from public/img/legends/bmi_status.png rename to public/img/legends/wfd_bmi_status_.png diff --git a/public/img/legends/chem_status.png b/public/img/legends/wfd_chem_status_.png similarity index 100% rename from public/img/legends/chem_status.png rename to public/img/legends/wfd_chem_status_.png diff --git a/public/img/legends/chla_status.png b/public/img/legends/wfd_chla_status_.png similarity index 100% rename from public/img/legends/chla_status.png rename to public/img/legends/wfd_chla_status_.png diff --git a/public/img/legends/eco_status.png b/public/img/legends/wfd_eco_status_.png similarity index 100% rename from public/img/legends/eco_status.png rename to public/img/legends/wfd_eco_status_.png diff --git a/public/img/legends/ma_status.png b/public/img/legends/wfd_ma_status_.png similarity index 100% rename from public/img/legends/ma_status.png rename to public/img/legends/wfd_ma_status_.png diff --git a/public/img/legends/pcqi_status.png b/public/img/legends/wfd_pcqi_status_.png similarity index 100% rename from public/img/legends/pcqi_status.png rename to public/img/legends/wfd_pcqi_status_.png diff --git a/public/js/extras.js b/public/js/extras.js index 4310cc6..2a3b986 100644 --- a/public/js/extras.js +++ b/public/js/extras.js @@ -163,18 +163,18 @@ function getBathymetry() { const rnb = L.tileLayer.wms(rainbow_url, { transparent: true, layers: 'emodnet:mean_rainbowcolour', format: 'image/png'}); const cnt = L.tileLayer.wms(rainbow_url, { transparent: true, layers: 'emodnet:contours', format: 'image/png'}); - legends['DPTH'] = L.control.Legend({ - position: "bottomright", - title: 'Bathymetry', - symbolWidth: 150, - symbolHeight: 208, - collapsed: false, - legends: [{ - type: "image", - label: ' ', - url: "https://tiles.emodnet-bathymetry.eu/legends/legend_rainbow.png" - }] - }).addTo(mapL); + // legends['DPTH'] = L.control.Legend({ + // position: "bottomright", + // title: 'Bathymetry', + // symbolWidth: 150, + // symbolHeight: 208, + // collapsed: false, + // legends: [{ + // type: "image", + // label: ' ', + // url: "https://tiles.emodnet-bathymetry.eu/legends/legend_rainbow.png" + // }] + // }).addTo(mapL); remoteLayer = L.layerGroup([rnb, cnt]); return remoteLayer; @@ -222,19 +222,19 @@ function getHabitat(layerCode) { habitats.addLayer(l) }); - legends[layerCode] = L.control.Legend({ - position: "bottomright", - symbolWidth: 400, - symbolHeight: 600, - collapsed: false, - title: 'Habitat Type', - legends: [{ - type: "image", - label: ' ', - url: lgndUrl - }] - }).addTo(mapL); - + // legends[layerCode] = L.control.Legend({ + // position: "bottomright", + // symbolWidth: 400, + // symbolHeight: 600, + // collapsed: false, + // title: 'Habitat Type', + // legends: [{ + // type: "image", + // label: ' ', + // url: lgndUrl + // }] + // }).addTo(mapL); + // return habitats; } @@ -316,18 +316,18 @@ function getProduct(layer) { let l; l = L.tileLayer.betterWms(url, { transparent: true, layers: layer.code, format: 'image/png'}); - legends[layer.code] = L.control.Legend({ - position: "bottomright", - symbolWidth: 100, - symbolHeight: 200, - collapsed: false, - title: 'Probability of habitat presence', - legends: [{ - type: "image", - label: ' ', - url: legendUrl - }] - }).addTo(mapL); + // legends[layer.code] = L.control.Legend({ + // position: "bottomright", + // symbolWidth: 100, + // symbolHeight: 200, + // collapsed: false, + // title: 'Probability of habitat presence', + // legends: [{ + // type: "image", + // label: ' ', + // url: legendUrl + // }] + // }).addTo(mapL); mapL.on('click', e => { let location = e.latlng; }); @@ -360,7 +360,6 @@ function getWFD(layer) { const legendName = layerCode.split('_').slice(1,3).join('_'); const lgndUrl = BASE_URL + "/img/legends/" + legendName + ".png"; let l; - console.debug('layer: : : ', layer); l = L.tileLayer.wms(BASE_URL + '/geoserver/wms', { transparent: true, layers: layerCode + layer.minSuffix, format: 'image/png'}); wmsGroup.addLayer(l); @@ -377,19 +376,19 @@ function getWFD(layer) { logo: 'Year Selector ' + layerTitle, }).addTo(mapL); - legends[layerCode] = L.control.Legend({ - position: "bottomright", - title: layerTitle, - symbolWidth: 90, - symbolHeight: 130, - collapsed: false, - legends: [{ - type: "image", - label: '', - url: lgndUrl - }] - }).addTo(mapL); - + // legends[layerCode] = L.control.Legend({ + // position: "bottomright", + // title: layerTitle, + // symbolWidth: 90, + // symbolHeight: 130, + // collapsed: false, + // legends: [{ + // type: "image", + // label: '', + // url: lgndUrl + // }] + // }).addTo(mapL); + // return wmsGroup; } diff --git a/public/js/layers.js b/public/js/layers.js index b4110ce..65885b9 100644 --- a/public/js/layers.js +++ b/public/js/layers.js @@ -326,7 +326,7 @@ var layersList = [ leafletid: null, },{ name: 'PCQI Status', - code: 'wfd_chla_status_', + code: 'wfd_pcqi_status_', minSuffix: '2018', maxSuffix: '2021', active: false, @@ -400,7 +400,6 @@ async function layerTreeSwitch(node) { console.debug("wms layer: ", l); l.addTo(mapL); leafletId = l._leaflet_id; - console.debug("assigned leaflet id: ", leafletId); } else { console.debug("hide layer", layer.code); if (layer.format === 'geojson') @@ -427,6 +426,7 @@ async function layerTreeSwitch(node) { function clearLegend(layerCode) { try{ legends[layerCode].remove(); + delete legends[layerCode]; } catch (error) { console.debug('layer has no legend'); } diff --git a/public/js/treeview.js b/public/js/treeview.js index dec8b32..31ccca5 100644 --- a/public/js/treeview.js +++ b/public/js/treeview.js @@ -4,7 +4,7 @@ let nodeContext = [{ icon:'fa fa-download', title:'Download Layer', //context button click event - onClick : async (node) => { + onClick: async (node) => { document.getElementById('modal-download-layer').classList.add('is-active'); Alpine.store('downloadName', node.data.code); document.getElementById('modal-download-layer-name').textContent = "Layer name: " + node.data.code; @@ -15,7 +15,7 @@ let nodeContextLink = [{ icon:'fa fa-link', title:'Source Link', //context button click event - onClick : async (node) => { + onClick: async (node) => { window.open(node.data.n_hyperlink, '_blank') // downloadShapefile(node.data.code); } @@ -26,12 +26,40 @@ let citation = [{ icon:'fa fa-link', title:'Citation', //context button click event - onClick : async (node) => { + onClick: async (node) => { //console.log('add - '+node.id); window.open(node.data.n_citation, '_blank'); } }]; +let nodeContextLegend = [{ + icon: 'fa fa-icons', + title: 'Legend', + onClick: async (node) => { + const layerCode = node.data.code; + const layerTitle = node.data.n_title; + const lgndUrl = BASE_URL + "/img/legends/" + layerCode + ".png"; + + if (Object.hasOwn(legends, layerCode)) { + clearLegend(layerCode); + return; + } + + legends[layerCode] = L.control.Legend({ + position: "bottomright", + title: layerTitle, + symbolWidth: 'auto', + symbolHeight: 'auto', + collapsed: false, + legends: [{ + type: "image", + label: '', + url: lgndUrl + }] + }).addTo(mapL); + } +}]; + const myData = [{ n_id: 1, n_title: 'MARINE AREAS', @@ -282,14 +310,14 @@ const myData = [{ n_title: 'EMODNET Bathymetry', code: 'DPTH', n_parentid: 32, - n_elements: nodeContextLink, + n_elements: nodeContextLink.concat(nodeContextLegend), n_hyperlink: "https://doi.org/10.12770/bb6a87dd-e579-4036-abe1-e649cea9881a" },{ n_id: 322 , n_title: 'EMODNET Habitats', code: 'HABT', n_parentid: 32, - n_elements: nodeContextLink, + n_elements: nodeContextLink.concat(nodeContextLegend), n_hyperlink: "http://gis.ices.dk/geonetwork/srv/eng/catalog.search#/metadata/10d3d35c-8f8e-40ff-898f-32e0b037356c" }, // { @@ -314,101 +342,72 @@ const myData = [{ n_title: 'Probability of coralligenous habitat in the Mediterranean (MEDISEH)', code: 'mediseh_cora', n_parentid: 32, - n_elements: nodeContextLink, + n_elements: nodeContextLink.concat(nodeContextLegend), n_hyperlink: "http://gis.ices.dk/geonetwork/srv/eng/catalog.search#/metadata/4da88de5-b0b8-4de4-8aac-99a9b0980736" },{ n_id: 325, n_title: 'Probability of maerl habitat in the Mediterranean (MEDISEH)', code: 'mediseh_maerl', n_parentid: 32, - n_elements: nodeContextLink, + n_elements: nodeContextLink.concat(nodeContextLegend), n_hyperlink: "http://gis.ices.dk/geonetwork/srv/eng/catalog.search#/metadata/43c7ac30-04da-479d-b5c1-ba621f0981e4" },{ n_id: 326, n_title: 'Probability of Posidonia oceanica in the Mediterranean (MEDISEH)', code: 'mediseh_posidonia', n_parentid: 32, - n_elements: nodeContextLink, + n_elements: nodeContextLink.concat(nodeContextLegend), n_hyperlink: "http://gis.ices.dk/geonetwork/srv/eng/catalog.search#/metadata/a93cffc8-8f45-47a4-a9bd-c8ffd9ad53fb" },{ n_id: 327 , n_title: 'Seagrass Meadows', code: 'greek_seagrass_meadows_v0906_espg3035', n_parentid: 32, - n_elements: nodeContext.concat(nodeContextLink, citation), + n_elements: nodeContext.concat(nodeContextLink, citation, nodeContextLegend), n_hyperlink: "https://www.seanoe.org/data/00765/87740/", n_citation: "https://doi.org/10.1515/bot-2022-0011" },{ n_id: 331, n_title: 'Integrated Ecological Status', + code: 'wfd_eco_status_', + n_elements: nodeContext.concat(nodeContextLegend), n_parentid: 33 },{ n_id: 332, n_title: 'Benthic MacroInvertebrates – BMI (D2C1, D5C8, D6C3, D6C5)', + code: 'wfd_bmi_status_', + n_elements: nodeContext.concat(nodeContextLegend), n_parentid: 33 },{ n_id: 333, n_title: 'Macroalgae (MAI)', + code: 'wfd_ma_status_', + n_elements: nodeContext.concat(nodeContextLegend), n_parentid: 33 },{ n_id: 334, n_title: 'Angiosperms – AN (D2C1, D6C3, D6C5)', + code: 'wfd_an_status_', + n_elements: nodeContext.concat(nodeContextLegend), n_parentid: 33 },{ n_id: 335, n_title: 'Chlorophyl-a (D4C2, D5C2)', + code: 'wfd_chla_status_', + n_elements: nodeContext.concat(nodeContextLegend), n_parentid: 33 },{ n_id: 336, n_title: 'PhysicoChemical Quality Index – PCQI (D5C1, D5C4, D5C5)', + code: 'wfd_pcqi_status_', + n_elements: nodeContext.concat(nodeContextLegend), n_parentid: 33 },{ n_id: 337, n_title: 'Chemical Status – Chem (D8C1)', - n_parentid: 33 - },{ - n_id: 3311, - n_title: 'Ecological Status', - code: 'wfd_eco_status_', - n_elements: nodeContext, - n_parentid: 331 - },{ - n_id: 3321, - n_title: 'BMI Status', - code: 'wfd_bmi_status_', - n_elements: nodeContext, - n_parentid: 332 - },{ - n_id: 3331, - n_title: 'MA Status', - code: 'wfd_ma_status_', - n_elements: nodeContext, - n_parentid: 333 - },{ - n_id: 3341, - n_title: 'AN Status', - code: 'wfd_an_status_', - n_elements: nodeContext, - n_parentid: 334 - },{ - n_id: 3351, - n_title: 'Chl-a Status', - code: 'wfd_chla_status_', - n_elements: nodeContext, - n_parentid: 335 - },{ - n_id: 3361, - n_title: 'PCQI Status', - code: 'wfd_chla_status_', - n_elements: nodeContext, - n_parentid: 336 - },{ - n_id: 3371, - n_title: 'Chemi Status', code: 'wfd_chem_status_', - n_elements: nodeContext, - n_parentid: 337 - } -]; + n_elements: nodeContext.concat(nodeContextLegend), + n_parentid: 33 + }]; /* =======================*/