<?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: Change the scale navigation events zoom on dynamic map in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-scale-navigation-events-zoom-on-dynamic/m-p/643720#M60050</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have the zoom values front-loaded so that they fire as one event when the user stops scrolling.&amp;nbsp; I just can't figure out how they scale the map graphic.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Aug 2013 15:16:17 GMT</pubDate>
    <dc:creator>DerekMaune</dc:creator>
    <dc:date>2013-08-12T15:16:17Z</dc:date>
    <item>
      <title>Change the scale navigation events zoom on dynamic map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-scale-navigation-events-zoom-on-dynamic/m-p/643716#M60046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is there a way to change the amount scale is increased/decreased by the mouse click and mouse scroll wheel navigation events on a Dynamic Map?&amp;nbsp; Failing that, is there a way to override the core portion of these functions?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Aug 2013 18:56:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-scale-navigation-events-zoom-on-dynamic/m-p/643716#M60046</guid>
      <dc:creator>DerekMaune</dc:creator>
      <dc:date>2013-08-09T18:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: Change the scale navigation events zoom on dynamic map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-scale-navigation-events-zoom-on-dynamic/m-p/643717#M60047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm not sure about changing what happens with the zoom controls, but for the second part of your question, you should be able to override/bypass their default behaviour in favour of your own.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can switch off the zoom in/out buttons using &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;&lt;A class="jive-link-external-small" href="https://developers.arcgis.com/en/javascript/jsapi/map-amd.html#iszoomslider" rel="nofollow" target="_blank"&gt;isZoomSlider&lt;/A&gt; = false&lt;/SPAN&gt;&lt;SPAN&gt; then add your own +/- buttons to manually set the scale to the desired value, using &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://developers.arcgis.com/en/javascript/jsapi/map-amd.html#setscale" rel="nofollow" target="_blank"&gt;setScale&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To disable the scroll wheel you can use &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;&lt;A class="jive-link-external-small" href="https://developers.arcgis.com/en/javascript/jsapi/map-amd.html#isscrollwheelzoom" rel="nofollow" target="_blank"&gt;isScrollWheelZoom&lt;/A&gt; = false&lt;/SPAN&gt;&lt;SPAN&gt;, then listen for the &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://developers.arcgis.com/en/javascript/jsapi/map-amd.html#mouse-wheel" rel="nofollow" target="_blank"&gt;mouse wheel event&lt;/A&gt;&lt;SPAN&gt; and set the scale as above.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Aug 2013 08:49:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-scale-navigation-events-zoom-on-dynamic/m-p/643717#M60047</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2013-08-11T08:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: Change the scale navigation events zoom on dynamic map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-scale-navigation-events-zoom-on-dynamic/m-p/643718#M60048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Do you have any idea what function or hook, the default scroll method uses to front-load the zoom events on the client instead of running each individual step on the server?&amp;nbsp; What I mean is that with the default mouse scroll it will zoom the map in or out as long as you are scrolling and then once you stop it hits the server to update the graphics.&amp;nbsp; Is there documentation for the javascript map object functions that would allow me to duplicate this behavior?&amp;nbsp; The only documented functions and events seem to act on a discrete back-and-forth with the server.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 14:12:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-scale-navigation-events-zoom-on-dynamic/m-p/643718#M60048</guid>
      <dc:creator>DerekMaune</dc:creator>
      <dc:date>2013-08-12T14:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: Change the scale navigation events zoom on dynamic map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-scale-navigation-events-zoom-on-dynamic/m-p/643719#M60049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No idea, sorry. You could try hitting up &lt;/SPAN&gt;&lt;A href="https://twitter.com/derekswingley"&gt;@derekswingley&lt;/A&gt;&lt;SPAN&gt; on Twitter, or hope that he sees this post....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 14:48:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-scale-navigation-events-zoom-on-dynamic/m-p/643719#M60049</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2013-08-12T14:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Change the scale navigation events zoom on dynamic map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-scale-navigation-events-zoom-on-dynamic/m-p/643720#M60050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have the zoom values front-loaded so that they fire as one event when the user stops scrolling.&amp;nbsp; I just can't figure out how they scale the map graphic.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 15:16:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-scale-navigation-events-zoom-on-dynamic/m-p/643720#M60050</guid>
      <dc:creator>DerekMaune</dc:creator>
      <dc:date>2013-08-12T15:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: Change the scale navigation events zoom on dynamic map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-scale-navigation-events-zoom-on-dynamic/m-p/643721#M60051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have found a workaround that I do not favor overly much.&amp;nbsp; The rate of zoom on a dynamic map is hardcoded in the _extentUtil function in _coremap.js, but I don't want to rely on an edited framework so I will continue looking for some point to rejoin the normal execution path after overriding capture of the mousewheel events but before a full call to setScale.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 20:23:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-scale-navigation-events-zoom-on-dynamic/m-p/643721#M60051</guid>
      <dc:creator>DerekMaune</dc:creator>
      <dc:date>2013-08-12T20:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: Change the scale navigation events zoom on dynamic map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-scale-navigation-events-zoom-on-dynamic/m-p/643722#M60052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Derek,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you post your code showing what you have so far? Want to make sure we're on the same page...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Aug 2013 23:01:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-scale-navigation-events-zoom-on-dynamic/m-p/643722#M60052</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2013-08-14T23:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: Change the scale navigation events zoom on dynamic map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-scale-navigation-events-zoom-on-dynamic/m-p/643723#M60053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;rMap.map.disableScrollWheelZoom();
on(dom.byId(a),(!has("mozilla") ? "mousewheel" : "DOMMouseScroll"), function(e){ scroll(e) });
on(map,"zoom-end",function(){locked=false;applyZoom()});
on(map,"zoom-start",function(){locked=true;newScale=-1;});

var newScale = -1;
var locked = false;
var timer;
function scroll(e)
{ var s = e[(!has("mozilla") ? "wheelDelta" : "detail")] * (!has("mozilla") ? 1 : -1);
 if( !locked )
 { rMap.map.onZoomStart();
&amp;nbsp; newScale = rMap.map.getScale();
 }
 if(s&amp;gt;0) newScale = newScale*0.8;
 else newScale = newScale*1.2;
 clearTimeout(timer);
 timer = setTimeout(function(){rMap.map.onZoomEnd();},1500);
}
 
function applyZoom()
{ rMap.map.setScale(newScale);
}&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This correctly queues the scale change up on the client and commits it to a server request as one transaction.&amp;nbsp; The problem is that it does not provide user input that it is doing so (the default behavior of the map object uses a matrix transform on the image to show it zoom in or out.)&amp;nbsp; If I submit a setScale() call with each mouse event, the user has to wait for the map to update before they can submit another.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess what I want to know is if there's a way to call the function responsible for that transform in the map object, or duplicate it in a way that will not interfere with the map object and/or break on a framework update.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:21:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-scale-navigation-events-zoom-on-dynamic/m-p/643723#M60053</guid>
      <dc:creator>DerekMaune</dc:creator>
      <dc:date>2021-12-12T03:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Change the scale navigation events zoom on dynamic map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-scale-navigation-events-zoom-on-dynamic/m-p/643724#M60054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;rMap.map.disableScrollWheelZoom();
on(dom.byId(a),(!has("mozilla") ? "mousewheel" : "DOMMouseScroll"), function(e){ scroll(e) });
on(map,"zoom-end",function(){locked=false;applyZoom()});
on(map,"zoom-start",function(){locked=true;newScale=-1;});

var newScale = -1;
var locked = false;
var timer;
function scroll(e)
{ var s = e[(!has("mozilla") ? "wheelDelta" : "detail")] * (!has("mozilla") ? 1 : -1);
 if( !locked )
 { rMap.map.onZoomStart();
&amp;nbsp; newScale = rMap.map.getScale();
 }
 if(s&amp;gt;0) newScale = newScale*0.8;
 else newScale = newScale*1.2;
 clearTimeout(timer);
 timer = setTimeout(function(){rMap.map.onZoomEnd();},1500);
}
 
function applyZoom()
{ rMap.map.setScale(newScale);
}&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;This correctly queues the scale change up on the client and commits it to a server request as one transaction.&amp;nbsp; The problem is that it does not provide user input that it is doing so (the default behavior of the map object uses a matrix transform on the image to show it zoom in or out.)&amp;nbsp; If I submit a setScale() call with each mouse event, the user has to wait for the map to update before they can submit another.&lt;BR /&gt;&lt;BR /&gt;I guess what I want to know is if there's a way to call the function responsible for that transform in the map object, or duplicate it in a way that will not interfere with the map object and/or break on a framework update.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There's not a public method to do map image scaling, that happens as part of the zoom process and isn't exposed in the API. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Instead of overriding how the map zooms, why not &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" rel="nofollow noopener noreferrer" target="_blank"&gt;define zoom levels for the map&lt;/A&gt;&lt;SPAN&gt; at the various scales you want your users to visit?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:21:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-scale-navigation-events-zoom-on-dynamic/m-p/643724#M60054</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2021-12-12T03:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: Change the scale navigation events zoom on dynamic map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-scale-navigation-events-zoom-on-dynamic/m-p/643725#M60055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The documentation led me to believe there was not a way to do that with the Dynamic maps, only the Tiled.&amp;nbsp; I'm afraid I'm more of a tech drafted to work with GIS than someone experienced with Esri software.&amp;nbsp; Will a map service that supplies a Dynamic map provide a Tiled map, can a Dynamic map have it's LOD array set, or would I need to have the GIS people adjust something on the server to provide a Tiled map?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Aug 2013 17:10:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-scale-navigation-events-zoom-on-dynamic/m-p/643725#M60055</guid>
      <dc:creator>DerekMaune</dc:creator>
      <dc:date>2013-08-15T17:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: Change the scale navigation events zoom on dynamic map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-scale-navigation-events-zoom-on-dynamic/m-p/643726#M60056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No server side config necessary, you can manually specify zoom levels for a map that doesn't use tiled services. But there's some work involved...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Background info:&amp;nbsp; the recommended, default way to use a JS API map is to create a map then add a tiled service. When you add a tiled service to a map, the map automatically uses the levels defined in that service as the levels for the map and sets the map's spatial reference to that of the tiled service. If you're not using a tiled service, the map doesn't know where to find zoom levels so, if you want specific zoom levels, you have to specify them when you create the map (as well as a spatial reference for the map). In my previous post in this thread, I linked to a post that has code that shows this. Here's a simplified version that creates a map, specifies three zoom levels and add a dynamic service. I've also specified sliderStyle: "large" so you can see a slider with ticks that represents the available zoom levels:&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://jsbin.com/adesan/1" rel="nofollow noopener noreferrer" target="_blank"&gt;http://jsbin.com/adesan/1&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For you to do this, you need to figure out which scales you want available in your app, then generate an array of LODs (levels of detail) that you pass to the map constructor when you create your map. The smallest scale will be level zero. As scales get larger, level number goes up. Levels also require a value for resolution which is the number of map units per pixel. You can get this number with the following line of code: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
map.extent.getWidth() / map.width
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using that line of code along with map.getScale(), you can piece together an array of LODs to give to the map constructor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to specify a specific spatial reference, create an extent and pass that to the map constructor as the extent options. The &lt;/SPAN&gt;&lt;A href="http://developers.arcgis.com/en/javascript/samples/fl_any_projection/" rel="nofollow noopener noreferrer" target="_blank"&gt;feature layer in any projection sample&lt;/A&gt;&lt;SPAN&gt; is helpful for getting an extent in any spatial reference.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:21:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-scale-navigation-events-zoom-on-dynamic/m-p/643726#M60056</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2021-12-12T03:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Change the scale navigation events zoom on dynamic map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-scale-navigation-events-zoom-on-dynamic/m-p/643727#M60057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It seems like I've built a decent lod array.&amp;nbsp; I'll have to play with it some more to make sure it works everywhere, but my issue is resolved.&amp;nbsp; Thanks for your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 17:31:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-scale-navigation-events-zoom-on-dynamic/m-p/643727#M60057</guid>
      <dc:creator>DerekMaune</dc:creator>
      <dc:date>2013-08-16T17:31:45Z</dc:date>
    </item>
  </channel>
</rss>

