<?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 setPaintProperties raises exception on ArcGIS API for JavaScript 4.18 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/setpaintproperties-raises-exception-on-arcgis-api/m-p/1021309#M71532</link>
    <description>&lt;P&gt;After upgrading to the new ArcGIS API for JavaScript 4.18, calling the function &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#setLayoutProperties" target="_self"&gt;setPaintProperties&lt;/A&gt; of a &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html" target="_self"&gt;VectorTileLayer&lt;/A&gt; raises the following exception:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Uncaught TypeError: can't convert undefined to object
    G VectorTileLayerView2D.js:267
    attach VectorTileLayerView2D.js:273
    emit (index):234
    emit (index):234
    emit (index):235
    setLayoutProperties VectorTileLayer.js:184
    React 5
    unstable_runWithPriority scheduler.development.js:646
    React 3
    workLoop scheduler.development.js:590
    flushWork scheduler.development.js:545
    performWorkUntilDeadline scheduler.development.js:157
    js scheduler.development.js:180
    js scheduler.development.js:843
    Webpack 21
VectorTileLayerView2D.js:267:195
    G VectorTileLayerView2D.js:267
    attach VectorTileLayerView2D.js:273
    emit (index):234
    forEach self-hosted:206
    emit (index):234
    emit (index):235
    setLayoutProperties VectorTileLayer.js:184
    React 5
    unstable_runWithPriority scheduler.development.js:646
    React 3
    workLoop scheduler.development.js:590
    flushWork scheduler.development.js:545
    performWorkUntilDeadline scheduler.development.js:157
    (Async: EventHandlerNonNull)
    js scheduler.development.js:180
    js scheduler.development.js:843&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have tried calling the same function with the following PaintProps objects, but I get always the same exception:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{visibility: "visible"}&lt;/LI-CODE&gt;&lt;LI-CODE lang="javascript"&gt;{}&lt;/LI-CODE&gt;&lt;LI-CODE lang="javascript"&gt;{
"text-allow-overlap": false,
​
"text-anchor": "top",
​
"text-field": "{field}",
​
"text-font": Array [ "arial-regular" ],
​
"text-justify": "center",
​
"text-line-height": 1,
​
"text-offset": Array [ 0, 0 ],
​
"text-padding": 0,
​
"text-size": 18,
​
visibility: "visible"
​
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jan 2021 22:19:37 GMT</pubDate>
    <dc:creator>Adiba</dc:creator>
    <dc:date>2021-01-28T22:19:37Z</dc:date>
    <item>
      <title>setPaintProperties raises exception on ArcGIS API for JavaScript 4.18</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/setpaintproperties-raises-exception-on-arcgis-api/m-p/1021309#M71532</link>
      <description>&lt;P&gt;After upgrading to the new ArcGIS API for JavaScript 4.18, calling the function &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#setLayoutProperties" target="_self"&gt;setPaintProperties&lt;/A&gt; of a &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html" target="_self"&gt;VectorTileLayer&lt;/A&gt; raises the following exception:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Uncaught TypeError: can't convert undefined to object
    G VectorTileLayerView2D.js:267
    attach VectorTileLayerView2D.js:273
    emit (index):234
    emit (index):234
    emit (index):235
    setLayoutProperties VectorTileLayer.js:184
    React 5
    unstable_runWithPriority scheduler.development.js:646
    React 3
    workLoop scheduler.development.js:590
    flushWork scheduler.development.js:545
    performWorkUntilDeadline scheduler.development.js:157
    js scheduler.development.js:180
    js scheduler.development.js:843
    Webpack 21
VectorTileLayerView2D.js:267:195
    G VectorTileLayerView2D.js:267
    attach VectorTileLayerView2D.js:273
    emit (index):234
    forEach self-hosted:206
    emit (index):234
    emit (index):235
    setLayoutProperties VectorTileLayer.js:184
    React 5
    unstable_runWithPriority scheduler.development.js:646
    React 3
    workLoop scheduler.development.js:590
    flushWork scheduler.development.js:545
    performWorkUntilDeadline scheduler.development.js:157
    (Async: EventHandlerNonNull)
    js scheduler.development.js:180
    js scheduler.development.js:843&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have tried calling the same function with the following PaintProps objects, but I get always the same exception:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{visibility: "visible"}&lt;/LI-CODE&gt;&lt;LI-CODE lang="javascript"&gt;{}&lt;/LI-CODE&gt;&lt;LI-CODE lang="javascript"&gt;{
"text-allow-overlap": false,
​
"text-anchor": "top",
​
"text-field": "{field}",
​
"text-font": Array [ "arial-regular" ],
​
"text-justify": "center",
​
"text-line-height": 1,
​
"text-offset": Array [ 0, 0 ],
​
"text-padding": 0,
​
"text-size": 18,
​
visibility: "visible"
​
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 22:19:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/setpaintproperties-raises-exception-on-arcgis-api/m-p/1021309#M71532</guid>
      <dc:creator>Adiba</dc:creator>
      <dc:date>2021-01-28T22:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: setPaintProperties raises exception on ArcGIS API for JavaScript 4.18</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/setpaintproperties-raises-exception-on-arcgis-api/m-p/1021586#M71540</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please provide a reproducible case? Visibility is a layout property (&lt;A href="https://docs.mapbox.com/mapbox-gl-js/style-spec/layers/#layout-property" target="_blank"&gt;https://docs.mapbox.com/mapbox-gl-js/style-spec/layers/#layout-property&lt;/A&gt;) so using setPaintProperties to change style layer visibility wont work.&amp;nbsp; In any case,&amp;nbsp;I am not able to reproduce the issue with this sample.&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/layers-vectortilelayer-json/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/layers-vectortilelayer-json/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please check out this sample as showcases new methods that will allow you update the vector tile styles.&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/layers-vectortilelayer-style/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/layers-vectortilelayer-style/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Undral&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 16:51:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/setpaintproperties-raises-exception-on-arcgis-api/m-p/1021586#M71540</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2021-01-29T16:51:34Z</dc:date>
    </item>
  </channel>
</rss>

