<?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: Bug: 4.16+ Webscene - Invalid layer item type 'Map Service', expected 'Image Service' in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bug-4-16-webscene-invalid-layer-item-type-map/m-p/1232869#M79369</link>
    <description>&lt;P&gt;Just adding to above reply, which adequately explains the problem.&lt;/P&gt;&lt;P&gt;As far as I can tell from the data, the bug was in SceneViewer 10.8.1, which somehow wrote the wrong layerType into the webscene json. How and why this happened is hard to track down now.&lt;BR /&gt;This combination still worked with the less strict API 4.15, but is now "correctly" rejected with API &amp;gt;= 4.16.&lt;/P&gt;&lt;P&gt;As mentioned, one way to fix it is to manually adjust the &lt;A href="https://gisportal.scc.qld.gov.au/portal/sharing/rest/content/items/dd5e07c09fcc4ace9e4559e16e74d617/data?f=json" target="_blank" rel="noopener"&gt;webscene json&lt;/A&gt;:&amp;nbsp;&lt;BR /&gt;change&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"layerType": "ArcGISTiledImageServiceLayer"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;to&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"layerType": "ArcGISTiledMapServiceLayer"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;. This can be done with&amp;nbsp;&lt;A href="https://ago-assistant.esri.com/" target="_blank" rel="noopener"&gt;https://ago-assistant.esri.com/&lt;/A&gt;&amp;nbsp;for example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Option 2, likely simpler: delete and re-add the problematic layer in SceneViewer, and resave the webscene.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Nov 2022 18:56:01 GMT</pubDate>
    <dc:creator>AndreasUlmer</dc:creator>
    <dc:date>2022-11-17T18:56:01Z</dc:date>
    <item>
      <title>Bug: 4.16+ Webscene - Invalid layer item type 'Map Service', expected 'Image Service'</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bug-4-16-webscene-invalid-layer-item-type-map/m-p/1231433#M79320</link>
      <description>&lt;P&gt;I've come across what I believe to be a bug in ArcGIS Javascript API versions 4.16 or greater. I have a simple webscene with elevation layer, basemap and tiled aerial imagery layer. The elevation and aerial imagery were created in Pro using Manage Tiles Cache, then exported to .tpkx, shared with Portal and published through the Portal interface. The web scene works perfectly in the Scene Viewer:&lt;/P&gt;&lt;P&gt;&lt;A href="https://gisportal.scc.qld.gov.au/portal/home/webscene/viewer.html?webscene=dd5e07c09fcc4ace9e4559e16e74d617" target="_blank" rel="noopener"&gt;https://gisportal.scc.qld.gov.au/portal/home/webscene/viewer.html?webscene=dd5e07c09fcc4ace9e4559e16e74d617&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However when I load the same webscene using the Javascript API I get an &lt;STRONG&gt;&lt;EM&gt;Invalid layer item type 'Map Service', expected 'Image Service'&lt;/EM&gt;&lt;/STRONG&gt; error, and the aerial imagery does not display:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="javascript_error.jpg" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/55918i066B9AE51667DF5D/image-size/large?v=v2&amp;amp;px=999" role="button" title="javascript_error.jpg" alt="javascript_error.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's a CodePen showing the error:&amp;nbsp;&lt;A href="https://codepen.io/TimMcG/pen/yLEXweG" target="_blank" rel="noopener"&gt;https://codepen.io/TimMcG/pen/yLEXweG&lt;/A&gt;&amp;nbsp;(just using the Load A Basic Web Scene sample, with config for my portal)&lt;/P&gt;&lt;P&gt;If you change the API version to 4.15 it works, but 4.16 or later shows the error.&lt;/P&gt;&lt;P&gt;ArcGIS Enterprise \ Portal version is 10.8.1.&lt;/P&gt;&lt;P&gt;Why it's a bug:&lt;/P&gt;&lt;P&gt;Well, the web scene works perfectly well in Scene Viewer. It's created in the standard way using Pro and Portal - I really can't do anything differently on my side of things. The fault is clearly with the Javascript API being unable to display my scene. And 10.8.1 and 4.16 were released in the same month, so they should work together.&lt;/P&gt;&lt;P&gt;Thanks for any assistance.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Nov 2022 20:42:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bug-4-16-webscene-invalid-layer-item-type-map/m-p/1231433#M79320</guid>
      <dc:creator>Tim_McGinnes</dc:creator>
      <dc:date>2022-11-14T20:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: Bug: 4.16+ Webscene - Invalid layer item type 'Map Service', expected 'Image Service'</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bug-4-16-webscene-invalid-layer-item-type-map/m-p/1232075#M79336</link>
      <description>&lt;P&gt;Yes, this is a bug. It should be the wrong type of this layer recorded in the webscene. Maybe you can go to the \arcgisportal\content\items directory to find the corresponding item of the webscene and modify the content of this item file.&lt;/P&gt;&lt;P&gt;There is no problem with the version before 4.16 because ImageryTileLayer was added in version 4.16. If the layer type is recorded incorrectly on the server side, it affects client-side layer loading from version 4.16 onwards.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 03:06:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bug-4-16-webscene-invalid-layer-item-type-map/m-p/1232075#M79336</guid>
      <dc:creator>Lerman</dc:creator>
      <dc:date>2022-11-16T03:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: Bug: 4.16+ Webscene - Invalid layer item type 'Map Service', expected 'Image Service'</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bug-4-16-webscene-invalid-layer-item-type-map/m-p/1232869#M79369</link>
      <description>&lt;P&gt;Just adding to above reply, which adequately explains the problem.&lt;/P&gt;&lt;P&gt;As far as I can tell from the data, the bug was in SceneViewer 10.8.1, which somehow wrote the wrong layerType into the webscene json. How and why this happened is hard to track down now.&lt;BR /&gt;This combination still worked with the less strict API 4.15, but is now "correctly" rejected with API &amp;gt;= 4.16.&lt;/P&gt;&lt;P&gt;As mentioned, one way to fix it is to manually adjust the &lt;A href="https://gisportal.scc.qld.gov.au/portal/sharing/rest/content/items/dd5e07c09fcc4ace9e4559e16e74d617/data?f=json" target="_blank" rel="noopener"&gt;webscene json&lt;/A&gt;:&amp;nbsp;&lt;BR /&gt;change&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"layerType": "ArcGISTiledImageServiceLayer"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;to&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"layerType": "ArcGISTiledMapServiceLayer"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;. This can be done with&amp;nbsp;&lt;A href="https://ago-assistant.esri.com/" target="_blank" rel="noopener"&gt;https://ago-assistant.esri.com/&lt;/A&gt;&amp;nbsp;for example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Option 2, likely simpler: delete and re-add the problematic layer in SceneViewer, and resave the webscene.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 18:56:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bug-4-16-webscene-invalid-layer-item-type-map/m-p/1232869#M79369</guid>
      <dc:creator>AndreasUlmer</dc:creator>
      <dc:date>2022-11-17T18:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Bug: 4.16+ Webscene - Invalid layer item type 'Map Service', expected 'Image Service'</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bug-4-16-webscene-invalid-layer-item-type-map/m-p/1266296#M80505</link>
      <description>&lt;P&gt;Thanks Andreas - that did the trick. Unfortunately whenever you save the web scene it changes it back to&amp;nbsp;ArcGISTiledImageServiceLayer. We are currently upgrading from 10.8.1 to 11 so hopefully that will fix the issue with Scene Viewer.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 23:34:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bug-4-16-webscene-invalid-layer-item-type-map/m-p/1266296#M80505</guid>
      <dc:creator>Tim_McGinnes</dc:creator>
      <dc:date>2023-03-09T23:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: Bug: 4.16+ Webscene - Invalid layer item type 'Map Service', expected 'Image Service'</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bug-4-16-webscene-invalid-layer-item-type-map/m-p/1266983#M80526</link>
      <description>&lt;P&gt;Thanks for getting back Tim.&lt;BR /&gt;Yes, this problem is supposed to be gone with 11. Please let us know in case you still have issues.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2023 09:08:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bug-4-16-webscene-invalid-layer-item-type-map/m-p/1266983#M80526</guid>
      <dc:creator>AndreasUlmer</dc:creator>
      <dc:date>2023-03-13T09:08:18Z</dc:date>
    </item>
  </channel>
</rss>

