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>
<Style name="likes"> <Style name="likes">
<Rule> <Rule>
<Filter>[likes] &gt;= 9</Filter> <Filter>[likes] &gt;= 10</Filter>
<PolygonSymbolizer fill="#800026" />
</Rule>
<Rule>
<Filter>[likes] &gt;= 8 and [likes] &lt; 9</Filter>
<PolygonSymbolizer fill="#bd0026" /> <PolygonSymbolizer fill="#bd0026" />
</Rule> </Rule>
<Rule> <Rule>
<Filter>[likes] &gt;= 7 and [likes] &lt; 8</Filter> <Filter>[likes] &gt;= 5 and [likes] &lt; 10</Filter>
<PolygonSymbolizer fill="#e31a1c" /> <PolygonSymbolizer fill="#e31a1c" />
</Rule> </Rule>
<Rule> <Rule>
<Filter>[likes] &gt;= 6 and [likes] &lt; 7</Filter> <Filter>[likes] &gt;= 4 and [likes] &lt; 5</Filter>
<PolygonSymbolizer fill="#fc4e2a" /> <PolygonSymbolizer fill="#fc4e2a" />
</Rule> </Rule>
<Rule> <Rule>
<Filter>[likes] &gt;= 5 and [likes] &lt; 6</Filter> <Filter>[likes] &gt;= 3 and [likes] &lt; 4</Filter>
<PolygonSymbolizer fill="#fd8d3c" /> <PolygonSymbolizer fill="#fd8d3c" />
</Rule> </Rule>
<Rule> <Rule>
<Filter>[likes] &gt;= 4 and [likes] &lt; 5</Filter> <Filter>[likes] &gt;= 2 and [likes] &lt; 3</Filter>
<PolygonSymbolizer fill="#feb24c" /> <PolygonSymbolizer fill="#feb24c" />
</Rule> </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> <Rule>
<Filter>[likes] &lt; 2</Filter> <Filter>[likes] &lt; 2</Filter>
<PolygonSymbolizer fill="#ffffcc" /> <PolygonSymbolizer fill="#fed976" />
</Rule> </Rule>
</Style> </Style>
</Map> </Map>

View File

@ -55,7 +55,12 @@ const LEGEND_CONFIG = {
like: { like: {
title: "Like Me", title: "Like Me",
elements: [ 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: { use: {