<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to dynamically color VectorTileLayer in JavaScript 4.6? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-dynamically-color-vectortilelayer-in/m-p/308180#M28293</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rene,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To make sure I understand...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we have a VTLayer with say, 10,000 "features", and want to do a continuous color vis, we'd have to create a style with 10,000 layers?&amp;nbsp; Each layer with a single feature and a different color assigned?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Feb 2018 11:51:51 GMT</pubDate>
    <dc:creator>JohnChmura</dc:creator>
    <dc:date>2018-02-14T11:51:51Z</dc:date>
    <item>
      <title>How to dynamically color VectorTileLayer in JavaScript 4.6?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-dynamically-color-vectortilelayer-in/m-p/308178#M28291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How does one dynamically style&amp;nbsp;a vector tile layer based on data that is external to the layer?&lt;/P&gt;&lt;P&gt;Filtering clearly works, per&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.esri.com/migrated-users/51216"&gt;George Bochenek&lt;/A&gt;&amp;nbsp;example:&amp;nbsp;&lt;A class="" href="https://github.com/gbochenek/vector-tile-demo-js" style="color: #2989c5; text-decoration: none;" title="https://github.com/gbochenek/vector-tile-demo-js"&gt;GitHub - gbochenek/vector-tile-demo-js: Demo Application for switching vector tile styles on the fly&lt;/A&gt;&amp;nbsp; Likewise, the paint.fill-color can be changed to a single color.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, as soon as I add an expression, the layer disappears. Does ArcGIS Javascript 4.6 not support the full Mapbox spec?&amp;nbsp; For example, we should be able to use a match expression like this:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: #24292e; background-color: #ffffff;"&gt;tileLayerStyle.paint['fill-color'] = [ "match", [ "get", "Origin"], "ORD", "#FF0000", "DEN", "#FF0000", "#000000" ];&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="color: #24292e; background-color: #ffffff;"&gt;So if that isn't supported, what is the recommended way of doing this type of styling?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 14:23:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-dynamically-color-vectortilelayer-in/m-p/308178#M28291</guid>
      <dc:creator>JohnChmura</dc:creator>
      <dc:date>2018-02-13T14:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically color VectorTileLayer in JavaScript 4.6?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-dynamically-color-vectortilelayer-in/m-p/308179#M28292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can create a copy of the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#style"&gt;style property&lt;/A&gt;, modify the JSON object of the style for the VTLayer and reapply it using the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#loadStyle"&gt;loadStyle()&lt;/A&gt; method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We don't support expressions in the styles, and I don't know if that's planned at all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 01:20:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-dynamically-color-vectortilelayer-in/m-p/308179#M28292</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2018-02-14T01:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically color VectorTileLayer in JavaScript 4.6?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-dynamically-color-vectortilelayer-in/m-p/308180#M28293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rene,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To make sure I understand...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we have a VTLayer with say, 10,000 "features", and want to do a continuous color vis, we'd have to create a style with 10,000 layers?&amp;nbsp; Each layer with a single feature and a different color assigned?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 11:51:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-dynamically-color-vectortilelayer-in/m-p/308180#M28293</guid>
      <dc:creator>JohnChmura</dc:creator>
      <dc:date>2018-02-14T11:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically color VectorTileLayer in JavaScript 4.6?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-dynamically-color-vectortilelayer-in/m-p/308181#M28294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If each of those 10,000 features has a different color, than technically yes. You could classify the data to a narrower set, and use the filter option per layer and designate the color.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similar to Geoge's sample, with this line:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;tileLayerStyle.filter = ["any",["==", "Origin", airport],["==", "Dest", airport]];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;But then apply a fill-color to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could precook the tiles in Pro and see what the output style file looks like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With 10,000 features, you could probably use the &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=layers-featurelayer-webgl"&gt;WebGL FeatureLayer&lt;/A&gt; and visual variables to accomplish this as well against the raw data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 16:04:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-dynamically-color-vectortilelayer-in/m-p/308181#M28294</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2018-02-14T16:04:34Z</dc:date>
    </item>
  </channel>
</rss>

