<?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: constrain zoom levels for some basemaps OR cancel map zoom in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/constrain-zoom-levels-for-some-basemaps-or-cancel/m-p/473381#M12525</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Thanks.&amp;nbsp; I'd like to avoid adding an LOD to the overall web map.&amp;nbsp; All my other basemaps stop at 1:1,128 and wouldn't benefit from another LOD. The higher res&amp;nbsp;image is only for part of the county, so I wanted to allow zooming to the 1:564 LOD only if a user deliberately chooses the higher res image so they are less likely to be confused by a blank map outside of the high res footprint.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Dec 2016 19:10:27 GMT</pubDate>
    <dc:creator>SebastianRoberts</dc:creator>
    <dc:date>2016-12-09T19:10:27Z</dc:date>
    <item>
      <title>constrain zoom levels for some basemaps OR cancel map zoom</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/constrain-zoom-levels-for-some-basemaps-or-cancel/m-p/473375#M12519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've added some aerial basemaps with the basemap widget that don't have the same default LODs as the default basemap. &amp;nbsp;Some have fewer zoom levels, and some require additional zoom levels. &amp;nbsp;Is there an easy way to constrain/add zoom levels if a certain basemap is turned on with the basemap widget? &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not, I've been able to add an LOD to the map before it gets created, then use a zoom event handler to zoom back to the previous level if the user has a certain basemap turned on and attempts to zooms out of the range for that basemap. However, this creates an odd zoom in/ zoom out user experience. What I'd rather do is cancel the zoom event in this case. &amp;nbsp;I could listen for zoom-start, but I can't &lt;STRONG&gt;find&amp;nbsp;a way to cancel the map zoom&lt;/STRONG&gt;. &amp;nbsp;Does anyone know how to do this in the javascript API?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Dec 2016 00:57:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/constrain-zoom-levels-for-some-basemaps-or-cancel/m-p/473375#M12519</guid>
      <dc:creator>SebastianRoberts</dc:creator>
      <dc:date>2016-12-08T00:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: constrain zoom levels for some basemaps OR cancel map zoom</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/constrain-zoom-levels-for-some-basemaps-or-cancel/m-p/473376#M12520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;Have you considered updating the maps LODs by added and removing LODs based on the selected basemap?&lt;/P&gt;&lt;P class=""&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;There is no way to just cancel the zoom event (many people have wanted to and tried).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Dec 2016 03:12:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/constrain-zoom-levels-for-some-basemaps-or-cancel/m-p/473376#M12520</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-12-08T03:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: constrain zoom levels for some basemaps OR cancel map zoom</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/constrain-zoom-levels-for-some-basemaps-or-cancel/m-p/473377#M12521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have, but I didn't think it was possible. &amp;nbsp;I know you can set LODs in the &lt;EM&gt;Map&lt;/EM&gt; constructor, but I don't see a method call or a property that I can update on the &lt;EM&gt;Map&lt;/EM&gt; class after it is created. &amp;nbsp;Is there a way to do that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Dec 2016 20:03:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/constrain-zoom-levels-for-some-basemaps-or-cancel/m-p/473377#M12521</guid>
      <dc:creator>SebastianRoberts</dc:creator>
      <dc:date>2016-12-08T20:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: constrain zoom levels for some basemaps OR cancel map zoom</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/constrain-zoom-levels-for-some-basemaps-or-cancel/m-p/473378#M12522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sebastian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I have not done much testing but you can access the maps lods at runtime using&amp;nbsp;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;map.__tileInfo.lods&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Dec 2016 21:13:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/constrain-zoom-levels-for-some-basemaps-or-cancel/m-p/473378#M12522</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-12-08T21:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: constrain zoom levels for some basemaps OR cancel map zoom</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/constrain-zoom-levels-for-some-basemaps-or-cancel/m-p/473379#M12523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Thanks for the suggestion.&amp;nbsp; I tried adding the additional LOD to the array, but it does not seem to update the map.&amp;nbsp; The zoom tools, double click,&amp;nbsp;and the mouse wheel do not allow me to zoom in the extra level.&amp;nbsp; Perhaps I'm just stuck with the quick zoom in/ zoom out user experience.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;if(this.basemapGallery.getSelected().title === 'West County 2016'){
&amp;nbsp; this.map.__tileInfo.lods.push({"level":10,"resolution":0.14929107082380833,"scale":564.248587});
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:31:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/constrain-zoom-levels-for-some-basemaps-or-cancel/m-p/473379#M12523</guid>
      <dc:creator>SebastianRoberts</dc:creator>
      <dc:date>2021-12-12T16:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: constrain zoom levels for some basemaps OR cancel map zoom</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/constrain-zoom-levels-for-some-basemaps-or-cancel/m-p/473380#M12524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sebastain,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;If it is just adding LODs then you can do this in the WAB UI on the map tab you can add additional LODs. The way I have mine is after a certain scale the esri basemap turns off (based on minScale) and then my basemap (orthos) cuts on (maxScale)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2016 01:38:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/constrain-zoom-levels-for-some-basemaps-or-cancel/m-p/473380#M12524</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-12-09T01:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: constrain zoom levels for some basemaps OR cancel map zoom</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/constrain-zoom-levels-for-some-basemaps-or-cancel/m-p/473381#M12525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Thanks.&amp;nbsp; I'd like to avoid adding an LOD to the overall web map.&amp;nbsp; All my other basemaps stop at 1:1,128 and wouldn't benefit from another LOD. The higher res&amp;nbsp;image is only for part of the county, so I wanted to allow zooming to the 1:564 LOD only if a user deliberately chooses the higher res image so they are less likely to be confused by a blank map outside of the high res footprint.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2016 19:10:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/constrain-zoom-levels-for-some-basemaps-or-cancel/m-p/473381#M12525</guid>
      <dc:creator>SebastianRoberts</dc:creator>
      <dc:date>2016-12-09T19:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: constrain zoom levels for some basemaps OR cancel map zoom</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/constrain-zoom-levels-for-some-basemaps-or-cancel/m-p/473382#M12526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sebastian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Well there is not a real good way to do this then. Here is something you could try though:&lt;/P&gt;&lt;P&gt;What I am doing is if the basemap is National Geographic and the user zooms in beyond 16 then I display a busy indicator and snap back to level 16 then hide the indicator.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; require([
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "esri/dijit/util/busyIndicator",
...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; busyUtil,
...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bi = busyUtil.create({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; target: "map",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fadeDuration: 500
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; basemapGallery.on("selection-change", function(evt){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(evt.target._selectedBasemap.title === "National Geographic"){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var zoomEndEvt = on.pausable(map, "zoom-end", function(event){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (event.level &amp;gt; 16){
&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; zoomEndEvt.pause();
&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; bi.show();
&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; map.setLevel(16).then(function(){
&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; bi.hide();
&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; zoomEndEvt.resume();
&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; }&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:55:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/constrain-zoom-levels-for-some-basemaps-or-cancel/m-p/473382#M12526</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T20:55:57Z</dc:date>
    </item>
  </channel>
</rss>

