<?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 How to add &amp;amp;quot;choose a scale&amp;amp;quot; in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-amp-quot-choose-a-scale-amp-quot/m-p/348494#M32225</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm writing a web application with the Javascript API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd like to add the possibility to the user to choose the scale he want to see data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the sample, I've only see sample of scalebar, which is not what I'd like to do.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does somebody knows where I can find a sample of this functionality? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nathalie&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Oct 2011 14:24:44 GMT</pubDate>
    <dc:creator>NathalieLambert</dc:creator>
    <dc:date>2011-10-13T14:24:44Z</dc:date>
    <item>
      <title>How to add &amp;quot;choose a scale&amp;quot;</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-amp-quot-choose-a-scale-amp-quot/m-p/348494#M32225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm writing a web application with the Javascript API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd like to add the possibility to the user to choose the scale he want to see data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the sample, I've only see sample of scalebar, which is not what I'd like to do.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does somebody knows where I can find a sample of this functionality? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nathalie&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Oct 2011 14:24:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-amp-quot-choose-a-scale-amp-quot/m-p/348494#M32225</guid>
      <dc:creator>NathalieLambert</dc:creator>
      <dc:date>2011-10-13T14:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to add "choose a scale"</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-amp-quot-choose-a-scale-amp-quot/m-p/348495#M32226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I'm writing a web application with the Javascript API.&lt;BR /&gt;&lt;BR /&gt;I'd like to add the possibility to the user to choose the scale he want to see data.&lt;BR /&gt;&lt;BR /&gt;In the sample, I've only see sample of scalebar, which is not what I'd like to do.&lt;BR /&gt;&lt;BR /&gt;Does somebody knows where I can find a sample of this functionality? &lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Nathalie&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't think API provide this functionality directly. However it should be relatively easy to implement this functionality. Here are my thoughts. Create a dropdown and populate the scales. if your map contains ArcGISTiledMapServiceLayer, get scales and levels in the following: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ArcGISTiledMapServiceLayer -&amp;gt; tileInfo -&amp;gt;lods-&amp;gt;lod (lod.level and lod.scale). Once user pick up a scale, get the level corrspondent to that scale and use map.setLevel(level) to zoom to that scale. If you map does not contains tiledlayer, you can populate dropdown with the scales you defined, once user pick up a scale, you could use map.centerAndZoom( map.extent.getCenter(), pickedScale/esri.geometry.getScale(map)) to zoom to pickedScale. Hope it will help&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Oct 2011 17:31:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-amp-quot-choose-a-scale-amp-quot/m-p/348495#M32226</guid>
      <dc:creator>HemingZhu</dc:creator>
      <dc:date>2011-10-13T17:31:50Z</dc:date>
    </item>
  </channel>
</rss>

