Test yellow-red colour for likes

This commit is contained in:
Tom Russell 2018-11-21 22:06:22 +00:00
parent f8e907f86d
commit bc1661dc76
2 changed files with 36 additions and 2 deletions

View File

@ -170,7 +170,40 @@
</Style>
<Style name="likes">
<Rule>
<PolygonSymbolizer fill="#f03b20" />
<Filter>[likes] &gt;= 9</Filter>
<PolygonSymbolizer fill="#800026" />
</Rule>
<Rule>
<Filter>[likes] &gt;= 8 and [likes] &lt; 9</Filter>
<PolygonSymbolizer fill="#bd0026" />
</Rule>
<Rule>
<Filter>[likes] &gt;= 7 and [likes] &lt; 8</Filter>
<PolygonSymbolizer fill="#e31a1c" />
</Rule>
<Rule>
<Filter>[likes] &gt;= 6 and [likes] &lt; 7</Filter>
<PolygonSymbolizer fill="#fc4e2a" />
</Rule>
<Rule>
<Filter>[likes] &gt;= 5 and [likes] &lt; 6</Filter>
<PolygonSymbolizer fill="#fd8d3c" />
</Rule>
<Rule>
<Filter>[likes] &gt;= 4 and [likes] &lt; 5</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" />
</Rule>
</Style>
</Map>

View File

@ -168,7 +168,8 @@ router.get('/likes/:z/:x/:y.png', function(req, res) {
const bbox = get_bbox(req.params)
const table_def = `(
SELECT
g.geometry_geom
g.geometry_geom,
b.likes_total as likes
FROM
geometries as g,
buildings as b