<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 11.00.9600.19236"></HEAD>
<BODY>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN class=761195221-04022019>Dear
All,</SPAN></FONT></DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN
class=761195221-04022019></SPAN></FONT> </DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN class=761195221-04022019>I
was working on the configuration of MapServer generated MVT tiles for
a demo country world map and had success with MS v 7.2
outputting tiles in MVT format ( all thanks to <A
href="https://github.com/sdlime/mvt-demo">https://github.com/sdlime/mvt-demo</A> ).</SPAN></FONT></DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN class=761195221-04022019>I am
trying to work on the client side style for my demo map (using mapbox-gl.js) and
defined them in a similar way as JSON as in Steve's mvt-demo above. The whole
thing is later intended to be used in a benchmark for MapServer MVT rendering
speed versus T-Rex ( see <A
href="http://blog.sourcepole.ch/2018/09/06/the-tale-of-a-vector-tile-benchmark/">http://blog.sourcepole.ch/2018/09/06/the-tale-of-a-vector-tile-benchmark/</A> ) .</SPAN></FONT></DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN
class=761195221-04022019></SPAN></FONT> </DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN class=761195221-04022019>For
now I am struggling with specifying the correct style syntax for the client
side and it seem that I missing something as I was not yet able to
successfully use attribute properties to render Countries as different colors
based on an attribute field of my PostGIS source.</SPAN></FONT></DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN class=761195221-04022019>Below
is the configuration of my 'allcountries' layer. The mapcolor7 filed is an
integer field (in the input PostGIS source) but my set-up fails to output
multiple colors , instead I am getting all default black for the country fill
color. </SPAN></FONT><FONT color=#000080 size=2 face=Arial><SPAN
class=761195221-04022019>A second layer where I specified only Italy as
one Country 'country-italy' to show up renders fine - see <A
href="https://github.com/karstenv/mvt-benchmark/blob/master/MapServer/countries_mvt.png">https://github.com/karstenv/mvt-benchmark/blob/master/MapServer/countries_mvt.png</A></SPAN></FONT></DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN
class=761195221-04022019></SPAN></FONT> </DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN class=761195221-04022019>My
complete style JSON is at <A
href="https://github.com/karstenv/mvt-benchmark/blob/master/MapServer/ms_ne_simple.json">https://github.com/karstenv/mvt-benchmark/blob/master/MapServer/ms_ne_simple.json</A></SPAN></FONT></DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN class=761195221-04022019>and
the corresponding map file is here <A
href="https://github.com/karstenv/mvt-benchmark/blob/master/MapServer/ne.map">https://github.com/karstenv/mvt-benchmark/blob/master/MapServer/ne.map</A></SPAN></FONT></DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN
class=761195221-04022019></SPAN></FONT> </DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN class=761195221-04022019>Would
anyone know what I need to change in order to render the countries with
different colors according to the 'mapcolor7' attribute ?</SPAN></FONT></DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN class=761195221-04022019>To me
it seems that somehow the attribute is not available to the
renderer even though in the MapServer map file I am selecting all fields in
the sub-query ...</SPAN></FONT></DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN
class=761195221-04022019> </SPAN></FONT></DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN
class=761195221-04022019>Thanks</SPAN></FONT></DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN
class=761195221-04022019>Karsten</SPAN></FONT></DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN
class=761195221-04022019></SPAN></FONT> </DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN
class=761195221-04022019>--------------------------------------------</SPAN></FONT></DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN
class=761195221-04022019>{<BR> "id":
"country-fill",<BR> "type": "fill",<BR>
"source": "compass",<BR> "source-layer":
"allcountries",<BR> "paint":
{<BR> "fill-color":
{<BR> "property":
"mapcolor7",<BR> "stops":
[<BR> [1,
"#fdaf6b"],<BR>
[2,
"#fdc663"],<BR>
[3,
"#fae364"],<BR>
[4,
"#d3e46f"],<BR>
[5,
"#aadb78"],<BR>
[6,
"#a3cec5"],<BR>
[7, "#ceb5cf"]<BR>
]<BR> }<BR>
}<BR>},{<BR> "id": "country-italy",<BR>
"type": "fill",<BR> "source": "compass",<BR>
"source-layer": "italy",<BR> "paint":
{<BR> "fill-color":
"#fdc663"<BR> }<BR> }</SPAN></FONT></DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN
class=761195221-04022019></SPAN></FONT><FONT color=#000080 size=2
face=Arial><SPAN class=761195221-04022019></SPAN></FONT> </DIV>
<DIV align=left>
<DIV align=left><SPAN
style="FONT-SIZE: 11pt; FONT-FAMILY: 'Verdana','sans-serif'">Karsten
Vennemann<BR></SPAN><SPAN
style="FONT-SIZE: 9pt; FONT-FAMILY: 'Verdana','sans-serif'"><SPAN
style="COLOR: #003264"><SPAN
style='FONT-SIZE: 10pt; FONT-FAMILY: "Arial",sans-serif; COLOR: navy'>Terra GIS
<BR></SPAN></SPAN></SPAN></DIV></DIV></BODY></HTML>