<?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: Deck GL layer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deck-gl-layer/m-p/1167833#M77131</link>
    <description>&lt;P&gt;Thanks a&amp;nbsp;&lt;SPAN&gt;Geodario... You have saved me for which i have been digging for a long time... Thanks a lot.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Apr 2022 07:26:26 GMT</pubDate>
    <dc:creator>MANESK</dc:creator>
    <dc:date>2022-04-26T07:26:26Z</dc:date>
    <item>
      <title>Deck GL layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deck-gl-layer/m-p/1167396#M77121</link>
      <description>&lt;LI-CODE lang="markup"&gt;&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;Get Started with deck.gl and ArcGIS&amp;lt;/title&amp;gt;
    &amp;lt;script src="https://unpkg.com/deck.gl@^8.1.0/dist.min.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script src="https://unpkg.com/@deck.gl/arcgis@^8.1.0/dist.min.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script src="https://js.arcgis.com/4.14/"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;link rel="stylesheet" href="https://js.arcgis.com/4.14/esri/themes/light/main.css"/&amp;gt;
  &amp;lt;/head&amp;gt;

  &amp;lt;body style="margin:0;"&amp;gt;
    &amp;lt;div id="container" style="width: 100vw; height: 100vh;"&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;

  &amp;lt;script type="text/javascript"&amp;gt;

const {loadArcGISModules, LineLayer, TripsLayer} = deck;

loadArcGISModules(['esri/Map', 'esri/views/MapView']).then(({DeckLayer, modules}) =&amp;gt; {
  const [ArcGISMap, MapView] = modules;
  const layer = new DeckLayer({
    'deck.layers': [
	  new LineLayer({
	  data : [
      {
        from: {
          coordinates: [20.73538695099026, -28.77379854455738]
        },
        to: {
          coordinates: [20.95355739840002, -28.72483213551782]
      },
		color : [255, 0, 0]
      }
    ],
		getWidth: 10,
		getSourcePosition: (d) =&amp;gt; d.from.coordinates,
		getTargetPosition: (d) =&amp;gt; d.to.coordinates,
		getColor: (d) =&amp;gt; d.color
	}),
	//setInterval(() =&amp;gt; {
	new TripsLayer({
                data: [
				
				 {
    "vendor": 1,
    "path": [
			 [
                        20.96003363140634,
                        -28.72707669607578
                    ],
                    [
                        20.96989483139986,
                        -28.7291125310373
                    ],
                    [
                        20.98540108166015,
                        -28.73186726973713
                    ],
                    [
                        20.99892691118618,
                        -28.72838056397172
                    ],
                    [
                        21.02175809047586,
                        -28.72009019978077
                    ],
                    [
                        21.05557748582157,
                        -28.69461277912606
                    ],
                    [
                        21.06303260197974,
                        -28.67736809651364
                    ],
                    [
                        21.07917116658651,
                        -28.65096426366177
                    ],
                    [
                        21.08864399364116,
                        -28.63809531672628
                    ],
                    [
                        21.09955496710639,
                        -28.62400854128327
                    ],
                    [
                        21.11456795389249,
                        -28.61619338796074
                    ]],
    "timestamps": [45,	75,	105,	135,	165,	195]
  }
  ],
                getPath: (d) =&amp;gt; {
                  return d.path;
                },
                getTimestamps: (d) =&amp;gt; {
                  return d.timestamps;
                },
                getColor: (d) =&amp;gt; {
                  return d.vendor === 0 ? [253, 128, 93] : [23, 184, 190];
                },
                opacity: 1.0,
                widthMinPixels: 4,
                rounded: true,
                trailLength: 180,
                //currentTime: (performance.now() % 5000) / 10,
                currentTime:100,
                shadowEnabled: false
              })
//			            }, 50)
    ]
  });

  const mapView = new MapView({
    container: 'container',
    map: new ArcGISMap({
      basemap: 'gray-vector',
      layers: [layer]
    }),
    center: [20.814, -28.653],
    zoom: 11
  });
});
  &amp;lt;/script&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;I'm trying to animate using Deck GL based on the samples provided in the forum. I 've tried to integrate the trips layer and the line layer. I'm able to visualize the line layer and trips layer based on the data . But my requirement is to animate the Trips layer by setting the Set interval . But if i try to use its throwing error.. I ve provided the code and request to fix it to overcome this error.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2022 08:30:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deck-gl-layer/m-p/1167396#M77121</guid>
      <dc:creator>MANESK</dc:creator>
      <dc:date>2022-04-25T08:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Deck GL layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deck-gl-layer/m-p/1167818#M77130</link>
      <description>&lt;P&gt;Hello Manesk! Thank you for your interest in @deck.gl/arcgis!&lt;/P&gt;&lt;P&gt;I forked your pen and made some changes: &lt;A href="https://codepen.io/dawken/pen/LYeKWyG?editors=1000" target="_blank" rel="noopener"&gt;https://codepen.io/dawken/pen/LYeKWyG?editors=1000&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In order to animate deck.gl layers, it is recommended that you create an empty DeckLayer:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; const layer = new DeckLayer();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then start scheduling intervals; each time that the callback fires, you set the new deck.gl layers from scratch, and change the properties of those that you want to animate:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;setInterval(() =&amp;gt; {&lt;BR /&gt;&amp;nbsp; layer.deck.layers = [&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; new LineLayer({ ... }),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; new TripsLayer({ ..., currentTime: (performance.now() % 5000) / 10, ... })&lt;/P&gt;&lt;P&gt;&amp;nbsp; ];&lt;/P&gt;&lt;P&gt;}, 50);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your original code was not working because you were calling setInterval() and assigning its result (a number, because setInterval() returns a number) as a layer in the layers array. Then Deck.GL was trying to treat that number as a layer, by setting the property "context" on it, and for some reason that resulted in the console error.&lt;/P&gt;&lt;P&gt;The animation technique that I just described is actually covered in detail in the official ArcGIS JS API SDK deck.gl sample. Refer to &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/custom-lv-deckgl/" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/sample-code/custom-lv-deckgl/&lt;/A&gt; for more info.&lt;/P&gt;&lt;P&gt;I hope this helps! Let me know if I can do something else!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 06:51:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deck-gl-layer/m-p/1167818#M77130</guid>
      <dc:creator>Geodario</dc:creator>
      <dc:date>2022-04-26T06:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Deck GL layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deck-gl-layer/m-p/1167833#M77131</link>
      <description>&lt;P&gt;Thanks a&amp;nbsp;&lt;SPAN&gt;Geodario... You have saved me for which i have been digging for a long time... Thanks a lot.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 07:26:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deck-gl-layer/m-p/1167833#M77131</guid>
      <dc:creator>MANESK</dc:creator>
      <dc:date>2022-04-26T07:26:26Z</dc:date>
    </item>
  </channel>
</rss>

