<?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 import view from @argis/core in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/import-view-from-argis-core/m-p/1087033#M74216</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm having a hard time figuring how to import&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#project" target="_blank" rel="noopener nofollow noreferrer"&gt;"view"&lt;SPAN&gt;&amp;nbsp;from&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="https://www.npmjs.com/package/@arcgis/core" target="_self" rel="nofollow noopener noreferrer"&gt;"@arcgis/core/views/View"&amp;nbsp;to use the `view.whenLayerview()` function`&amp;nbsp;&lt;/A&gt;&lt;/SPAN&gt;while trying to refactor the code to use WebPack.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am getting the following error:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;uncaught TypeError: _arcgis_core_views_View__WEBPACK_IMPORTED_MODULE_0__.whenLayerView is not a function&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have also tried using "import * as view from&amp;nbsp;@arcgis/core.views/View" but that didn't help.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your replies !&lt;/P&gt;</description>
    <pubDate>Mon, 09 Aug 2021 10:54:06 GMT</pubDate>
    <dc:creator>KenjooYeap</dc:creator>
    <dc:date>2021-08-09T10:54:06Z</dc:date>
    <item>
      <title>import view from @argis/core</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/import-view-from-argis-core/m-p/1087033#M74216</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm having a hard time figuring how to import&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#project" target="_blank" rel="noopener nofollow noreferrer"&gt;"view"&lt;SPAN&gt;&amp;nbsp;from&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="https://www.npmjs.com/package/@arcgis/core" target="_self" rel="nofollow noopener noreferrer"&gt;"@arcgis/core/views/View"&amp;nbsp;to use the `view.whenLayerview()` function`&amp;nbsp;&lt;/A&gt;&lt;/SPAN&gt;while trying to refactor the code to use WebPack.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am getting the following error:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;uncaught TypeError: _arcgis_core_views_View__WEBPACK_IMPORTED_MODULE_0__.whenLayerView is not a function&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have also tried using "import * as view from&amp;nbsp;@arcgis/core.views/View" but that didn't help.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your replies !&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 10:54:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/import-view-from-argis-core/m-p/1087033#M74216</guid>
      <dc:creator>KenjooYeap</dc:creator>
      <dc:date>2021-08-09T10:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: import view from @argis/core</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/import-view-from-argis-core/m-p/1087296#M74217</link>
      <description>&lt;P&gt;I suggest using this sample as a starting point for your app:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/jsapi-resources/tree/master/esm-samples/webpack" target="_blank"&gt;https://github.com/Esri/jsapi-resources/tree/master/esm-samples/webpack&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If your issue is still reproducible in that sample we can take a closer look.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 22:01:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/import-view-from-argis-core/m-p/1087296#M74217</guid>
      <dc:creator>BenElan</dc:creator>
      <dc:date>2021-08-09T22:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: import view from @argis/core</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/import-view-from-argis-core/m-p/1087318#M74219</link>
      <description>&lt;P&gt;Tagging onto Ben's comment, add this code to that sample and it should just work:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;  map.add(layer);

  view.whenLayerView(layer).then((layerView) =&amp;gt; {
    console.log(layerView);
  })
  .catch((error) =&amp;gt; {
    console.error(error);
  });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 23:29:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/import-view-from-argis-core/m-p/1087318#M74219</guid>
      <dc:creator>AndyGup</dc:creator>
      <dc:date>2021-08-09T23:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: import view from @argis/core</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/import-view-from-argis-core/m-p/1087400#M74229</link>
      <description>&lt;P&gt;Thanks for your replies!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found the problem, my error was trying to import view from&amp;nbsp;@arcgis/core module while the view needed for the whenLayerView is the reference to the MapView. importing the view from where mapview is defined instead works.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 09:19:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/import-view-from-argis-core/m-p/1087400#M74229</guid>
      <dc:creator>KenjooYeap</dc:creator>
      <dc:date>2021-08-10T09:19:14Z</dc:date>
    </item>
  </channel>
</rss>

