<?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: Is it possible to control the map.panUp amount? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-control-the-map-panup-amount/m-p/59072#M5192</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I just want to nudge the map up a tiny bit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll do it manually by adjusting the map.extent object - but it'd be a nice enhancement request to be able to specify the amount of the pan.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Feb 2012 07:07:31 GMT</pubDate>
    <dc:creator>StephenLead</dc:creator>
    <dc:date>2012-02-16T07:07:31Z</dc:date>
    <item>
      <title>Is it possible to control the map.panUp amount?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-control-the-map-panup-amount/m-p/59070#M5190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The map object has a &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/map.htm#panUp" rel="nofollow noopener noreferrer" target="_blank"&gt;panUp&lt;/A&gt;&lt;SPAN&gt; method, which doesn't accept any arguments.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #000088; font-family: monospace;"&gt;
function&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt; north&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;()&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;{
&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;&amp;nbsp; myMap&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;panUp&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;();
&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;SPAN style="font-family:Verdana;"&gt;&lt;SPAN style="color:#666600;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How does it decide how much to pan, and can it be adjusted (without resorting to hacks)? panUp(100) doesn't seem to have any effect.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/map.htm#panUp" rel="nofollow noopener noreferrer" target="_blank"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:14:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-control-the-map-panup-amount/m-p/59070#M5190</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2021-12-10T22:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to control the map.panUp amount?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-control-the-map-panup-amount/m-p/59071#M5191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is hardcoded into the API ... what do you want to do?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Feb 2012 07:03:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-control-the-map-panup-amount/m-p/59071#M5191</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-02-16T07:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to control the map.panUp amount?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-control-the-map-panup-amount/m-p/59072#M5192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I just want to nudge the map up a tiny bit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll do it manually by adjusting the map.extent object - but it'd be a nice enhancement request to be able to specify the amount of the pan.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Feb 2012 07:07:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-control-the-map-panup-amount/m-p/59072#M5192</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2012-02-16T07:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to control the map.panUp amount?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-control-the-map-panup-amount/m-p/59073#M5193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;it'd be a nice enhancement request to be able to specify the amount of the pan.&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Agreed. I'll throw it out the team. Until then, you'll need to do this manually by building a new extent and passing it to map.setExtent.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Feb 2012 07:10:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-control-the-map-panup-amount/m-p/59073#M5193</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-02-16T07:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to control the map.panUp amount?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-control-the-map-panup-amount/m-p/59074#M5194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;PS don't worry, I haven't sold out and decided to include pan arrows on my map. This is for something else &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>Thu, 16 Feb 2012 07:10:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-control-the-map-panup-amount/m-p/59074#M5194</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2012-02-16T07:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to control the map.panUp amount?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-control-the-map-panup-amount/m-p/59075#M5195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;PS don't worry, I haven't sold out and decided to include pan arrows on my map. This is for something else &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Glad to hear that. Hopefully you're enjoying the new superpan feature of 2.7...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Feb 2012 07:11:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-control-the-map-panup-amount/m-p/59075#M5195</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-02-16T07:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to control the map.panUp amount?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-control-the-map-panup-amount/m-p/59076#M5196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Steve, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure if you're still interested in this, but the ESRI JSAPI uses the Map's private method _fixedPan for the arrow keys keyboard navigation which just nudges the map in a given direction, as opposed to the big jump you get with the pan* methods.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To achieve what you seem to be asking (and I imagine this is not advocated by anyone since it's using a private/undocumented function), I simply provide a hard-coded value to indicate the amount of shift (notice it is sometimes negative, btw) in my pan functions. In my case, I just use a 0.0135 all the time. It's generally been close enough, although not exactly the same as the arrow key nudge amounts, for our purposes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Up: map._fixedPan(0, map.height * -0.0135)
Right: map._fixedPan(map.width * 0.0135, 0)
Down: map._fixedPan(0, map.height * 0.0135)
Left: map._fixedPan(map.width * -0.0135, 0)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If anyone's aware of why this is really not a good idea (besides the fact that the _fixedPan function is undocumented and, consequently, unsupported...a risk I am willing to take but others may not be so inclined, understandably), feel free to share. I haven't noticed any issues, but that doesn't mean there aren't any.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;jtm&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:14:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-control-the-map-panup-amount/m-p/59076#M5196</guid>
      <dc:creator>JoanneMcGraw</dc:creator>
      <dc:date>2021-12-10T22:14:41Z</dc:date>
    </item>
  </channel>
</rss>

