Like me legend and style

This commit is contained in:
Tom Russell 2018-12-05 20:30:29 +00:00
parent 31b1483141
commit 5a5ad68e75
2 changed files with 12 additions and 19 deletions

View File

@ -170,40 +170,28 @@
</Style>
<Style name="likes">
<Rule>
<Filter>[likes] &gt;= 9</Filter>
<PolygonSymbolizer fill="#800026" />
</Rule>
<Rule>
<Filter>[likes] &gt;= 8 and [likes] &lt; 9</Filter>
<Filter>[likes] &gt;= 10</Filter>
<PolygonSymbolizer fill="#bd0026" />
</Rule>
<Rule>
<Filter>[likes] &gt;= 7 and [likes] &lt; 8</Filter>
<Filter>[likes] &gt;= 5 and [likes] &lt; 10</Filter>
<PolygonSymbolizer fill="#e31a1c" />
</Rule>
<Rule>
<Filter>[likes] &gt;= 6 and [likes] &lt; 7</Filter>
<Filter>[likes] &gt;= 4 and [likes] &lt; 5</Filter>
<PolygonSymbolizer fill="#fc4e2a" />
</Rule>
<Rule>
<Filter>[likes] &gt;= 5 and [likes] &lt; 6</Filter>
<Filter>[likes] &gt;= 3 and [likes] &lt; 4</Filter>
<PolygonSymbolizer fill="#fd8d3c" />
</Rule>
<Rule>
<Filter>[likes] &gt;= 4 and [likes] &lt; 5</Filter>
<Filter>[likes] &gt;= 2 and [likes] &lt; 3</Filter>
<PolygonSymbolizer fill="#feb24c" />
</Rule>
<Rule>
<Filter>[likes] &gt;= 3 and [likes] &lt; 4</Filter>
<PolygonSymbolizer fill="#fed976" />
</Rule>
<Rule>
<Filter>[likes] &gt;= 2 and [likes] &lt; 3</Filter>
<PolygonSymbolizer fill="#ffeda0" />
</Rule>
<Rule>
<Filter>[likes] &lt; 2</Filter>
<PolygonSymbolizer fill="#ffffcc" />
<PolygonSymbolizer fill="#fed976" />
</Rule>
</Style>
</Map>

View File

@ -55,7 +55,12 @@ const LEGEND_CONFIG = {
like: {
title: "Like Me",
elements: [
{ color: '#f65400', text: '👍 🎉 +1' },
{ color: "#bd0026", text: '👍👍👍 ≥10' },
{ color: "#e31a1c", text: '👍👍 510' },
{ color: "#fc4e2a", text: '👍 4' },
{ color: "#fd8d3c", text: '👍 3' },
{ color: "#feb24c", text: '👍 2' },
{ color: "#fed976", text: '👍 1' },
]
},
use: {