<?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: Set maximum zoom in level in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-maximum-zoom-in-level/m-p/574445#M53663</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;That's the way to go. I've posted examples of how to do this in the past, most recently here:&amp;nbsp; &lt;A href="http://forums.arcgis.com/threads/68743-Removing-LODS-after-the-map-has-loaded?p=239740&amp;amp;viewfull=1#post239740"&gt;http://forums.arcgis.com/threads/68743-Removing-LODS-after-the-map-has-loaded?p=239740&amp;amp;viewfull=1#post239740&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you both.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Oct 2012 02:03:23 GMT</pubDate>
    <dc:creator>MarkPaulson</dc:creator>
    <dc:date>2012-10-19T02:03:23Z</dc:date>
    <item>
      <title>Set maximum zoom in level</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-maximum-zoom-in-level/m-p/574442#M53660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm a complete noob to Javascript and haven't done much programming in 15+ years, mainly autolisp. I have manage to get a map up and running using the identify with popup sample. &lt;/SPAN&gt;&lt;A href="http://www.geoiddata.com/pleasanton.html" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.geoiddata.com/pleasanton.html&lt;/A&gt;&lt;SPAN&gt;. My question is how do I limit the zoom in level so that I don't get the map data unavailable in background.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also wanted a scale bar so I stuck in the following (bold text):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function mapReady(map){

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.connect(map,"onClick",executeIdentifyTask);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&amp;nbsp;&amp;nbsp; var scalebar = new esri.dijit.Scalebar({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map: map,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scalebarUnit:'english'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/STRONG&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; //create identify tasks and setup parameters 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifyTask = new esri.tasks.IdentifyTask("http://www.geoiddata.com/ArcGIS/rest/services/Pleasanton/Pleasanton/MapServer");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifyParams = new esri.tasks.IdentifyParameters();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifyParams.tolerance = 3;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifyParams.returnGeometry = true;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifyParams.layerIds = [3,4];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifyParams.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_ALL;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifyParams.width&amp;nbsp; = map.width;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifyParams.height = map.height;
&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; //resize the map when the browser resizes
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.connect(dijit.byId('map'), 'resize', map,map.resize);
&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It works, but is that the best place to insert the scale bar code?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:43:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-maximum-zoom-in-level/m-p/574442#M53660</guid>
      <dc:creator>MarkPaulson</dc:creator>
      <dc:date>2021-12-12T00:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: Set maximum zoom in level</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-maximum-zoom-in-level/m-p/574443#M53661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You need to assign a value to the &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;lods&lt;/SPAN&gt;&lt;SPAN&gt; option in the &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/map.htm#MapConst"&gt;esri.Map constructor&lt;/A&gt;&lt;SPAN&gt; to limit the zoom levels.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 23:23:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-maximum-zoom-in-level/m-p/574443#M53661</guid>
      <dc:creator>JeffJacobson</dc:creator>
      <dc:date>2012-10-18T23:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: Set maximum zoom in level</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-maximum-zoom-in-level/m-p/574444#M53662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You need to assign a value to the &lt;SPAN style="font-style:italic;"&gt;lods&lt;/SPAN&gt; option in the &lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/map.htm#MapConst"&gt;esri.Map constructor&lt;/A&gt; to limit the zoom levels.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That's the way to go. I've posted examples of how to do this in the past, most recently here:&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/68743-Removing-LODS-after-the-map-has-loaded?p=239740&amp;amp;viewfull=1#post239740"&gt;http://forums.arcgis.com/threads/68743-Removing-LODS-after-the-map-has-loaded?p=239740&amp;amp;viewfull=1#post239740&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 01:47:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-maximum-zoom-in-level/m-p/574444#M53662</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-10-19T01:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: Set maximum zoom in level</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-maximum-zoom-in-level/m-p/574445#M53663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;That's the way to go. I've posted examples of how to do this in the past, most recently here:&amp;nbsp; &lt;A href="http://forums.arcgis.com/threads/68743-Removing-LODS-after-the-map-has-loaded?p=239740&amp;amp;viewfull=1#post239740"&gt;http://forums.arcgis.com/threads/68743-Removing-LODS-after-the-map-has-loaded?p=239740&amp;amp;viewfull=1#post239740&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you both.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 02:03:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-maximum-zoom-in-level/m-p/574445#M53663</guid>
      <dc:creator>MarkPaulson</dc:creator>
      <dc:date>2012-10-19T02:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: Set maximum zoom in level</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-maximum-zoom-in-level/m-p/574446#M53664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;be careful though, while it works for max, it does not work for minimum if you use setLevel.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for example, if you do LOD 4-16, and then do setLevel(4) it goes to the 4th level, which in this case is level 7.&amp;nbsp; Very counter intuitive.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 15:03:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-maximum-zoom-in-level/m-p/574446#M53664</guid>
      <dc:creator>JeffPace</dc:creator>
      <dc:date>2012-10-19T15:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set maximum zoom in level</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-maximum-zoom-in-level/m-p/574447#M53665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;be careful though, while it works for max, it does not work for minimum if you use setLevel.&lt;BR /&gt;&lt;BR /&gt;for example, if you do LOD 4-16, and then do setLevel(4) it goes to the 4th level, which in this case is level 7.&amp;nbsp; Very counter intuitive.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is true, the best approach would be to use zero through whatever to number your levels as you specify them in map.options.lods. I should have done this in the example but did a lazy copy/paste. Here's a better example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
lods: [
&amp;nbsp; {"level" : 0, "resolution" : 2445.98490512499, "scale" : 9244648.868618}, 
&amp;nbsp; {"level" : 1, "resolution" : 1222.99245256249, "scale" : 4622324.434309}, 
&amp;nbsp; {"level" : 2, "resolution" : 611.49622628138, "scale" : 2311162.217155}, 
&amp;nbsp; {"level" : 3, "resolution" : 305.748113140558, "scale" : 1155581.108577}, 
&amp;nbsp; {"level" : 4, "resolution" : 152.874056570411, "scale" : 577790.554289}, 
&amp;nbsp; {"level" : 5, "resolution" : 76.4370282850732, "scale" : 288895.277144}, 
&amp;nbsp; {"level" : 6, "resolution" : 38.2185141425366, "scale" : 144447.638572}, 
&amp;nbsp; {"level" : 7, "resolution" : 19.1092570712683, "scale" : 72223.819286}, 
&amp;nbsp; {"level" : 8, "resolution" : 9.55462853563415, "scale" : 36111.909643}, 
&amp;nbsp; {"level" : 9, "resolution" : 4.77731426794937, "scale" : 18055.954822}, 
&amp;nbsp; {"level" : 10, "resolution" : 2.38865713397468, "scale" : 9027.977411}
]
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:43:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-maximum-zoom-in-level/m-p/574447#M53665</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2021-12-12T00:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Set maximum zoom in level</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-maximum-zoom-in-level/m-p/574448#M53666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;This is true, the best approach would be to use zero through whatever to number your levels as you specify them in map.options.lods. I should have done this in the example but did a lazy copy/paste. Here's a better example:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
lods: [
&amp;nbsp; {"level" : 0, "resolution" : 2445.98490512499, "scale" : 9244648.868618}, 
&amp;nbsp; {"level" : 1, "resolution" : 1222.99245256249, "scale" : 4622324.434309}, 
&amp;nbsp; {"level" : 2, "resolution" : 611.49622628138, "scale" : 2311162.217155}, 
&amp;nbsp; {"level" : 3, "resolution" : 305.748113140558, "scale" : 1155581.108577}, 
&amp;nbsp; {"level" : 4, "resolution" : 152.874056570411, "scale" : 577790.554289}, 
&amp;nbsp; {"level" : 5, "resolution" : 76.4370282850732, "scale" : 288895.277144}, 
&amp;nbsp; {"level" : 6, "resolution" : 38.2185141425366, "scale" : 144447.638572}, 
&amp;nbsp; {"level" : 7, "resolution" : 19.1092570712683, "scale" : 72223.819286}, 
&amp;nbsp; {"level" : 8, "resolution" : 9.55462853563415, "scale" : 36111.909643}, 
&amp;nbsp; {"level" : 9, "resolution" : 4.77731426794937, "scale" : 18055.954822}, 
&amp;nbsp; {"level" : 10, "resolution" : 2.38865713397468, "scale" : 9027.977411}
]
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't mean to get the thread of topic, but my concern with the above approach is what happens when we bring in other layers? for example AGO or OSM or a webtiledservice? if you use the {$row}/{$col}/{$lvl} url pattern, and are expecting lvl 10 to be the "universal" definition of 10 based on Google/Bing/ESRI, it causes lots of problems.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It would be really really nice if we could just leave the lods default, not have to define anything, and just say map.maxScale = 16 and map.minScale = 6&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:44:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-maximum-zoom-in-level/m-p/574448#M53666</guid>
      <dc:creator>JeffPace</dc:creator>
      <dc:date>2021-12-12T00:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: Set maximum zoom in level</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-maximum-zoom-in-level/m-p/574449#M53667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I don't mean to get the thread of topic, but my concern with the above approach is what happens when we bring in other layers? for example AGO or OSM or a webtiledservice? if you use the {$row}/{$col}/{$lvl} url pattern, and are expecting lvl 10 to be the "universal" definition of 10 based on Google/Bing/ESRI, it causes lots of problems.&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Agreed, the current way to do this has issues...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;It would be really really nice if we could just leave the lods default, not have to define anything, and just say map.maxScale = 16 and map.minScale = 6&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's like you've been sitting in on our team meetings... I'm not committing to a timeline, but we're planning to add zoom, minZoom, maxZoom, minScale and maxScale properties to map.options to simplify this whole workflow. zoom would be used to specify the zoom level the map starts at, minZoom and maxZoom specify minimum and maxim zoom levels, if that's not obvious ;).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 16:44:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-maximum-zoom-in-level/m-p/574449#M53667</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-10-19T16:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: Set maximum zoom in level</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-maximum-zoom-in-level/m-p/574450#M53668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Agreed, the current way to do this has issues...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;It's like you've been sitting in on our team meetings... I'm not committing to a timeline, but we're planning to add zoom, minZoom, maxZoom, minScale and maxScale properties to map.options to simplify this whole workflow. zoom would be used to specify the zoom level the map starts at, minZoom and maxZoom specify minimum and maxim zoom levels, if that's not obvious ;).&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;These would be awesome!! especially if they modify the zoom slider as well. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2012 01:50:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-maximum-zoom-in-level/m-p/574450#M53668</guid>
      <dc:creator>JeffPace</dc:creator>
      <dc:date>2012-10-22T01:50:28Z</dc:date>
    </item>
  </channel>
</rss>

