Fix for issue #144 Reduce number of classes for 'Number of storeys' legend

This commit is contained in:
Martin-dJ 2019-04-16 14:33:07 +00:00
parent 48c2b071d8
commit ce4892bee4
2 changed files with 10 additions and 30 deletions

View File

@ -63,39 +63,23 @@
</Style>
<Style name="size_storeys">
<Rule>
<Filter>[size_storeys] &gt;= 20</Filter>
<Filter>[size_storeys] &gt;= 40</Filter>
<PolygonSymbolizer fill="#ffffcc" />
</Rule>
<Rule>
<Filter>[size_storeys] &gt;= 15 and [size_storeys] &lt; 20</Filter>
<PolygonSymbolizer fill="#ffeda0" />
</Rule>
<Rule>
<Filter>[size_storeys] &gt;= 10 and [size_storeys] &lt; 15</Filter>
<Filter>[size_storeys] &gt;= 20 and [size_storeys] &lt; 40</Filter>
<PolygonSymbolizer fill="#fed976" />
</Rule>
<Rule>
<Filter>[size_storeys] &gt;= 6 and [size_storeys] &lt; 10</Filter>
<PolygonSymbolizer fill="#feb24c" />
</Rule>
<Rule>
<Filter>[size_storeys] = 5</Filter>
<Filter>[size_storeys] &gt;= 10 and [size_storeys] &lt; 20</Filter>
<PolygonSymbolizer fill="#fd8d3c" />
</Rule>
<Rule>
<Filter>[size_storeys] = 4</Filter>
<PolygonSymbolizer fill="#fc4e2a" />
</Rule>
<Rule>
<Filter>[size_storeys] = 3</Filter>
<Filter>[size_storeys] &gt;= 6 and [size_storeys] &lt; 10</Filter>
<PolygonSymbolizer fill="#e31a1c" />
</Rule>
<Rule>
<Filter>[size_storeys] = 2</Filter>
<PolygonSymbolizer fill="#bd0026" />
</Rule>
<Rule>
<Filter>[size_storeys] = 1</Filter>
<Filter>[size_storeys] &gt;= 1 and [size_storeys] &lt; 6</Filter>
<PolygonSymbolizer fill="#800026" />
</Rule>
</Style>

View File

@ -42,15 +42,11 @@ const LEGEND_CONFIG = {
size: {
title: "Number of storeys",
elements: [
{ color: '#ffffcc', text: '≥20' },
{ color: '#ffeda0', text: '15-20' },
{ color: '#fed976', text: '1015' },
{ color: '#feb24c', text: '610' },
{ color: '#fd8d3c', text: '5' },
{ color: '#fc4e2a', text: '4' },
{ color: '#e31a1c', text: '3' },
{ color: '#bd0026', text: '2' },
{ color: '#800026', text: '1' },
{ color: '#ffffcc', text: '≥40' },
{ color: '#fed976', text: '2039' },
{ color: '#fd8d3c', text: '10-19' },
{ color: '#e31a1c', text: '6-9' },
{ color: '#800026', text: '1-5' },
]
},
like: {