<?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 Limiting LODs displayed on map in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/limiting-lods-displayed-on-map/m-p/340379#M31514</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using an ArcGISTiledMapServiceLayer. I know that I only want LODs 4 through 14. I don't want to hardcode the resolution/scale of these LODs. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I have a catch-22 problem. I can only limit the LODs displayed on construction of the map; it doesn't appear that I can set them later. But I can't figure out the LODs available without loading the layer, which means adding it to a previously-constructed map. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does this mean I can only do this by constructing a map, adding the layer, determining the LODs, destroying the map, reconstructing it with the right LODs, and re-adding the layer? Surely it's not so inefficient.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 12 Feb 2011 15:24:38 GMT</pubDate>
    <dc:creator>JeffOzvold</dc:creator>
    <dc:date>2011-02-12T15:24:38Z</dc:date>
    <item>
      <title>Limiting LODs displayed on map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/limiting-lods-displayed-on-map/m-p/340379#M31514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using an ArcGISTiledMapServiceLayer. I know that I only want LODs 4 through 14. I don't want to hardcode the resolution/scale of these LODs. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I have a catch-22 problem. I can only limit the LODs displayed on construction of the map; it doesn't appear that I can set them later. But I can't figure out the LODs available without loading the layer, which means adding it to a previously-constructed map. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does this mean I can only do this by constructing a map, adding the layer, determining the LODs, destroying the map, reconstructing it with the right LODs, and re-adding the layer? Surely it's not so inefficient.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Feb 2011 15:24:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/limiting-lods-displayed-on-map/m-p/340379#M31514</guid>
      <dc:creator>JeffOzvold</dc:creator>
      <dc:date>2011-02-12T15:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting LODs displayed on map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/limiting-lods-displayed-on-map/m-p/340380#M31515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is there a particular reason you do not want to hardcode the LOD's?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then only reason I can see to create the LODs on the fly like this is if you intend to allow the user to modify them on the fly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You are correct in that you "do" have to load the layer to select the LODs you want from the service in order to set them, and then of course the detroy and rebuild process.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Even if you do not hardcode the LODs upfront, you are still in essence hardcoding them, but through code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems to me it would just be easier to hardcode the LODs. Just go to the service's directory and copy and paste into your code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
//Custom levels of detail listing
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; customLods = [&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"level" : 0, "resolution" : 9783.93962049996, "scale" : 36978595.474472},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"level" : 1, "resolution" : 4891.96981024998, "scale" : 18489297.737236},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"level" : 2, "resolution" : 2445.98490512499, "scale" : 9244648.868618},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"level" : 3, "resolution" : 1222.99245256249, "scale" : 4622324.434309},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"level" : 4, "resolution" : 611.49622628138, "scale" : 2311162.217155},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"level" : 5, "resolution" : 305.748113140558, "scale" : 1155581.108577},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"level" : 6, "resolution" : 152.874056570411, "scale" : 577790.554289},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"level" : 7, "resolution" : 76.4370282850732, "scale" : 288895.277144},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"level" : 8, "resolution" : 38.2185141425366, "scale" : 144447.638572},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"level" : 9, "resolution" : 19.1092570712683, "scale" : 72223.819286},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"level" : 10, "resolution" : 9.55462853563415, "scale" : 36111.909643},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"level" : 11, "resolution" : 4.77731426794937, "scale" : 18055.954822},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"level" : 12, "resolution" : 2.38865713397468, "scale" : 9027.977411},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"level" : 13, "resolution" : 1.19432856685505, "scale" : 4513.988705}&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ];
&amp;nbsp; 
&amp;nbsp;&amp;nbsp; startExtent = new esri.geometry.Extent(-10947740.873, 2195752.071, -7202937.983, 4181891.814, new esri.SpatialReference({wkid:102100}));
&amp;nbsp;&amp;nbsp; map = new esri.Map("mapDiv", {extent: startExtent, lods: customLods, logo: false});
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:06:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/limiting-lods-displayed-on-map/m-p/340380#M31515</guid>
      <dc:creator>KeithSandell</dc:creator>
      <dc:date>2021-12-11T16:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting LODs displayed on map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/limiting-lods-displayed-on-map/m-p/340381#M31516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't want to hardcode because I (really) want to be able to say "Show me only LODs from 1:500 to 1:24,000". I don't control the tiled map service or its LODs, so they could potentially change without my knowledge. I'd rather code my application to respond appropriately to changes like that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I used fiddler on a map load and I realized that I can just make a dojo xhrGet call to the MapServer URL:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hurricanes/NOAA_Tracks_1851_2007/MapServer?f=json"&gt;http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hurricanes/NOAA_Tracks_1851_2007/MapServer?f=json&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The JSON data for tiled map services has the LODs in it, so I bet I could use that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Feb 2011 14:22:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/limiting-lods-displayed-on-map/m-p/340381#M31516</guid>
      <dc:creator>JeffOzvold</dc:creator>
      <dc:date>2011-02-14T14:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting LODs displayed on map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/limiting-lods-displayed-on-map/m-p/340382#M31517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I hadn't heard of Fiddler before this, but I wish I had. It might have helped with one of my recent problems.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I understand now why you don't want to hardcode the LODs, but the notion of cached maps that just up in change is scary. However, the solution you mentioned appears to be sound, you'll just need to carve out the Levels...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps it is nieve, but I expect the LODs to remain the same and in reality need them to because the user experience I create in my apps is almost always tied closely to the specific scales to make sure that users have an adequate, but not excessive geographic extent visible that best satisfies the needs of the tools being used.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess that is a benefit of coding for internal business purposes only, much more control.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Feb 2011 22:43:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/limiting-lods-displayed-on-map/m-p/340382#M31517</guid>
      <dc:creator>KeithSandell</dc:creator>
      <dc:date>2011-02-14T22:43:16Z</dc:date>
    </item>
  </channel>
</rss>

