<?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: Get layer tileInfo.lods and use it in my map. in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/get-layer-tileinfo-lods-and-use-it-in-my-map/m-p/270235#M8111</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok I've found a solution. Dont know if this is the best solution but it's working.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In MapManager.mxml in line 1398 add this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
if(configBasemaps&lt;I&gt;.type == "tiled" || configBasemaps&lt;I&gt;.type == "osm" || configBasemaps&lt;I&gt;.type == "bing")
{
 map.lods = layers&lt;I&gt;.tileInfo.lods;
}
&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I can switch between tiled services in basemap switcher which have different tiles defined.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 13:13:03 GMT</pubDate>
    <dc:creator>MarcinDruzgala</dc:creator>
    <dc:date>2021-12-11T13:13:03Z</dc:date>
    <item>
      <title>Get layer tileInfo.lods and use it in my map.</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/get-layer-tileinfo-lods-and-use-it-in-my-map/m-p/270234#M8110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok so here is the problem. I've already searched a lot about LODs on ESRI forum and on the web but i didn't find any solution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What i want to do is: when i switch the basemap in MapSwitcher i want to get tileInfo.lods(if the layer is tiled) and use this layer lods in my map. I have my service with different tiles than ArcGIS online map tiles, openstreetmap and bing map. I dont want to use these services as dynamic because the quality is dropping down to much and it's loading too long. As far as i know I even can't set the type for bing map and openstreetmap to dynamic to view them in my application. So here is the simple code from ESRI sample "switching basemaps":&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private function layerShowHandler(event:FlexEvent):void
 {
&amp;nbsp; // update the LODs/zoomslider to use/show the levels for the selected base map
&amp;nbsp; var tiledLayer:TiledMapServiceLayer = event.target as TiledMapServiceLayer;
&amp;nbsp; myMap.lods = tiledLayer.tileInfo.lods;
 }
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I implement this code in viewer source code? There is a lot of sites where switching between tiled layers causes loading different amount of LODs for every tiled layer. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I think it would be so nice to have a additional option to declare in the layer tag, like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!-- openstreetmap --&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;lt;layer label="Open Street Map" type="osm" visible="false" getLODs = "true"/&amp;gt; with default value of getLODs set to false. So when i choose from basemaps list open street map layer it gets it own LODs and when I switch back to my layer with different LODs it gets LODs from my service and updates the map etc. Anyone got idea how to make this programmatically in fw 3.0?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MDruzgala&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2012 11:02:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/get-layer-tileinfo-lods-and-use-it-in-my-map/m-p/270234#M8110</guid>
      <dc:creator>MarcinDruzgala</dc:creator>
      <dc:date>2012-10-04T11:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: Get layer tileInfo.lods and use it in my map.</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/get-layer-tileinfo-lods-and-use-it-in-my-map/m-p/270235#M8111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok I've found a solution. Dont know if this is the best solution but it's working.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In MapManager.mxml in line 1398 add this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
if(configBasemaps&lt;I&gt;.type == "tiled" || configBasemaps&lt;I&gt;.type == "osm" || configBasemaps&lt;I&gt;.type == "bing")
{
 map.lods = layers&lt;I&gt;.tileInfo.lods;
}
&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I can switch between tiled services in basemap switcher which have different tiles defined.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:13:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/get-layer-tileinfo-lods-and-use-it-in-my-map/m-p/270235#M8111</guid>
      <dc:creator>MarcinDruzgala</dc:creator>
      <dc:date>2021-12-11T13:13:03Z</dc:date>
    </item>
  </channel>
</rss>

