<?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: Issue 4.30 WMTS basemap effectiveLods is null in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issue-4-30-wmts-basemap-effectivelods-is-null/m-p/1654173#M87671</link>
    <description>&lt;P&gt;Referring to this page&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html&lt;/A&gt;&lt;BR /&gt;Chapter&amp;nbsp;Zoom and LODs&lt;BR /&gt;the effective LODs will be null in these cases&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;The MapView's&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints" target="_blank" rel="noopener"&gt;constraints.effectiveLODs&lt;/A&gt;will benullif the following statements are true:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The map doesn't have a&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap" target="_blank" rel="noopener"&gt;basemap&lt;/A&gt;, or&lt;/LI&gt;&lt;LI&gt;the basemap does not have a&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TileInfo.html" target="_blank" rel="noopener"&gt;TileInfo&lt;/A&gt;,&lt;/LI&gt;&lt;LI&gt;AND the first layer added to the map does not have a&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TileInfo.html" target="_blank" rel="noopener"&gt;TileInfo&lt;/A&gt;.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;If the effectiveLODs are&amp;nbsp;&lt;/SPAN&gt;null&lt;SPAN&gt;, it is not possible to set&amp;nbsp;&lt;/SPAN&gt;zoom&lt;SPAN&gt;&amp;nbsp;on the MapView because the conversion is not possible. The zoom value will be&amp;nbsp;&lt;/SPAN&gt;-1&lt;SPAN&gt;&amp;nbsp;in this case. Setting scale will work. To address this, the MapView's&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints" target="_blank" rel="noopener"&gt;constraints.lods&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;can be defined at the time of its initialization by calling&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TileInfo.html#create" target="_blank" rel="noopener"&gt;TileInfo.create().lods&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I tested that:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const view = new MapView({
	container: "mapViewDiv",
	map,
	constraints: constraints,
	popup: {},
	popupEnabled: false,
	highlightOptions: {
		color: new Color({
			r: 0,
			g: 158,
			b: 247,
			a: 1  // Optional
		}),
		haloOpacity: 0.9,
		fillOpacity: 0.6
	}
});

const lodsCreated = TileInfo.create({
	// create the LODs to match the spatial reference of the view
	spatialReference: view.spatialReference
}).lods;
view.constraints.lods = lodsCreated;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After that we receive:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const effectiveLODs = view.constraints.effectiveLODs; // -&amp;gt; 14 LODs
const LODs = view.constraints.lods; // -&amp;gt; 24 LODs&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A an alternative you could put LODs by hand (as const) since they are kind of hart coded on ESRI side:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/documentation/mapping-and-location-services/reference/zoom-levels-and-scale/#conversion-tool" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/documentation/mapping-and-location-services/reference/zoom-levels-and-scale/#conversion-tool&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;There you can see that the conversion tool distinghuishes between LODs for&amp;nbsp;Image tile layers and LODs for Vector tile layers. The scale of the same LOD on image tile layers is twice the value on the devider side as for vector tile layers.&lt;/P&gt;&lt;P&gt;Sample:&lt;BR /&gt;Zoom level:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;13&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Vector:&amp;nbsp;&lt;SPAN class=""&gt;1 :&amp;nbsp;&lt;SPAN&gt;36111.909643&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;Image: 1 :&amp;nbsp;&lt;SPAN&gt;72223.819286&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Sep 2025 14:04:59 GMT</pubDate>
    <dc:creator>SebastianKrings</dc:creator>
    <dc:date>2025-09-30T14:04:59Z</dc:date>
    <item>
      <title>Issue 4.30 WMTS basemap effectiveLods is null</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issue-4-30-wmts-basemap-effectivelods-is-null/m-p/1546126#M85830</link>
      <description>&lt;P class=""&gt;There is an issue with zooming (effectiveLods in MapView.constraints is null) when using WMTS as a basemap. The metadata from the WMTS is converted into TileInfo, but it’s stored in an undocumented property called tilemapCache. However, this TileInfo object is not applied to MapView.constraints.lods, which causes improper handling of LODs during map rendering and zooming.&lt;/P&gt;&lt;P class=""&gt;According to the MapView documentation (section Zoom and LODs)&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html&lt;/A&gt;&amp;nbsp;effectiveLODs will be null if the basemap doesn’t have tileInfo. However, WMTS services do have TileInfo (calculated from their metadata - TileMatrixSet), so effectiveLODs should not be null.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2024 13:30:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issue-4-30-wmts-basemap-effectivelods-is-null/m-p/1546126#M85830</guid>
      <dc:creator>mattheol</dc:creator>
      <dc:date>2024-10-07T13:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: Issue 4.30 WMTS basemap effectiveLods is null</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issue-4-30-wmts-basemap-effectivelods-is-null/m-p/1654173#M87671</link>
      <description>&lt;P&gt;Referring to this page&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html&lt;/A&gt;&lt;BR /&gt;Chapter&amp;nbsp;Zoom and LODs&lt;BR /&gt;the effective LODs will be null in these cases&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;The MapView's&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints" target="_blank" rel="noopener"&gt;constraints.effectiveLODs&lt;/A&gt;will benullif the following statements are true:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The map doesn't have a&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap" target="_blank" rel="noopener"&gt;basemap&lt;/A&gt;, or&lt;/LI&gt;&lt;LI&gt;the basemap does not have a&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TileInfo.html" target="_blank" rel="noopener"&gt;TileInfo&lt;/A&gt;,&lt;/LI&gt;&lt;LI&gt;AND the first layer added to the map does not have a&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TileInfo.html" target="_blank" rel="noopener"&gt;TileInfo&lt;/A&gt;.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;If the effectiveLODs are&amp;nbsp;&lt;/SPAN&gt;null&lt;SPAN&gt;, it is not possible to set&amp;nbsp;&lt;/SPAN&gt;zoom&lt;SPAN&gt;&amp;nbsp;on the MapView because the conversion is not possible. The zoom value will be&amp;nbsp;&lt;/SPAN&gt;-1&lt;SPAN&gt;&amp;nbsp;in this case. Setting scale will work. To address this, the MapView's&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints" target="_blank" rel="noopener"&gt;constraints.lods&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;can be defined at the time of its initialization by calling&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TileInfo.html#create" target="_blank" rel="noopener"&gt;TileInfo.create().lods&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I tested that:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const view = new MapView({
	container: "mapViewDiv",
	map,
	constraints: constraints,
	popup: {},
	popupEnabled: false,
	highlightOptions: {
		color: new Color({
			r: 0,
			g: 158,
			b: 247,
			a: 1  // Optional
		}),
		haloOpacity: 0.9,
		fillOpacity: 0.6
	}
});

const lodsCreated = TileInfo.create({
	// create the LODs to match the spatial reference of the view
	spatialReference: view.spatialReference
}).lods;
view.constraints.lods = lodsCreated;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After that we receive:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const effectiveLODs = view.constraints.effectiveLODs; // -&amp;gt; 14 LODs
const LODs = view.constraints.lods; // -&amp;gt; 24 LODs&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A an alternative you could put LODs by hand (as const) since they are kind of hart coded on ESRI side:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/documentation/mapping-and-location-services/reference/zoom-levels-and-scale/#conversion-tool" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/documentation/mapping-and-location-services/reference/zoom-levels-and-scale/#conversion-tool&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;There you can see that the conversion tool distinghuishes between LODs for&amp;nbsp;Image tile layers and LODs for Vector tile layers. The scale of the same LOD on image tile layers is twice the value on the devider side as for vector tile layers.&lt;/P&gt;&lt;P&gt;Sample:&lt;BR /&gt;Zoom level:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;13&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Vector:&amp;nbsp;&lt;SPAN class=""&gt;1 :&amp;nbsp;&lt;SPAN&gt;36111.909643&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;Image: 1 :&amp;nbsp;&lt;SPAN&gt;72223.819286&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2025 14:04:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issue-4-30-wmts-basemap-effectivelods-is-null/m-p/1654173#M87671</guid>
      <dc:creator>SebastianKrings</dc:creator>
      <dc:date>2025-09-30T14:04:59Z</dc:date>
    </item>
  </channel>
</rss>

