<?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 Zoom in Zoom out control in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-in-zoom-out-control/m-p/112991#M10534</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;SPAN&gt;I have two external button for zoomin and zoom out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;on click of zoomin button i am using &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;map.centerAndZoom()&lt;/PRE&gt;&lt;SPAN&gt; function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But it doesnt work for me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i want the extent to be maximixed and minimized..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;when use this,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.centerAndZoom((0,0),1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.centerAndZoom((0,0),2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;map centers to one position.. how do i make it dynamic..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i.e., on click on button it should keep zooming in.. and similarly the zoom out button as well&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;what other functions for the same can i manifest?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Jun 2012 05:26:36 GMT</pubDate>
    <dc:creator>PramodHarithsa1</dc:creator>
    <dc:date>2012-06-08T05:26:36Z</dc:date>
    <item>
      <title>Zoom in Zoom out control</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-in-zoom-out-control/m-p/112991#M10534</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;SPAN&gt;I have two external button for zoomin and zoom out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;on click of zoomin button i am using &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;map.centerAndZoom()&lt;/PRE&gt;&lt;SPAN&gt; function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But it doesnt work for me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i want the extent to be maximixed and minimized..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;when use this,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.centerAndZoom((0,0),1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.centerAndZoom((0,0),2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;map centers to one position.. how do i make it dynamic..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i.e., on click on button it should keep zooming in.. and similarly the zoom out button as well&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;what other functions for the same can i manifest?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2012 05:26:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-in-zoom-out-control/m-p/112991#M10534</guid>
      <dc:creator>PramodHarithsa1</dc:creator>
      <dc:date>2012-06-08T05:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom in Zoom out control</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-in-zoom-out-control/m-p/112992#M10535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you're using a tiled service, you can get the map's level, add or subtract one from it depending on which button is clicked and pass that as the second argument to centerAndZoom.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you're not using a tiled service, centerAndZoom probably isn't what you want. Rather, try building a new extent and using &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/map.htm#setExtent"&gt;map.setExtent&lt;/A&gt;&lt;SPAN&gt;. More info about using extents:&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/intro_extents.htm"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/intro_extents.htm&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2012 15:24:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-in-zoom-out-control/m-p/112992#M10535</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-06-08T15:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom in Zoom out control</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-in-zoom-out-control/m-p/112993#M10536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;If you're using a tiled service, you can get the map's level, add or subtract one from it depending on which button is clicked and pass that as the second argument to centerAndZoom.&lt;BR /&gt;&lt;BR /&gt;If you're not using a tiled service, centerAndZoom probably isn't what you want. Rather, try building a new extent and using &lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/map.htm#setExtent"&gt;map.setExtent&lt;/A&gt;. More info about using extents:&amp;nbsp; &lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/intro_extents.htm"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/intro_extents.htm&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a tiled service layer as well as a DynamicMapServiceLayer in the map..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for the location attribute i tried something like (map.extent.xmin+map.extent.xmax)/2 and similarly for y parameter.. but it didn't work for me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I just want the + and - functionality of zoom slider into buttons i have defined!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 04:26:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-in-zoom-out-control/m-p/112993#M10536</guid>
      <dc:creator>PramodHarithsa1</dc:creator>
      <dc:date>2012-06-11T04:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom in Zoom out control</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-in-zoom-out-control/m-p/112994#M10537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;With Reference to the doc.,&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How are the constants ZOOM_IN and ZOOM_OUT used?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 10:24:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-in-zoom-out-control/m-p/112994#M10537</guid>
      <dc:creator>PramodHarithsa1</dc:creator>
      <dc:date>2012-06-11T10:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom in Zoom out control</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-in-zoom-out-control/m-p/112995#M10538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi,&lt;BR /&gt;I have two external button for zoomin and zoom out.&lt;BR /&gt;on click of zoomin button i am using &lt;PRE class="plain" name="code"&gt;map.centerAndZoom()&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt; function.&lt;BR /&gt;But it doesnt work for me.&lt;BR /&gt;i want the extent to be maximixed and minimized..&lt;BR /&gt;&lt;BR /&gt;when use this,&lt;BR /&gt;map.centerAndZoom((0,0),1)&lt;BR /&gt;map.centerAndZoom((0,0),2)&lt;BR /&gt;&lt;BR /&gt;map centers to one position.. how do i make it dynamic..&lt;BR /&gt;i.e., on click on button it should keep zooming in.. and similarly the zoom out button as well&lt;BR /&gt;&lt;BR /&gt;what other functions for the same can i manifest?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Try this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For ZoomIn Button:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var extent=map.extent;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.setExtent(extent.expand(0.5));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For ZoomOut Button:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var extent=map.extent;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.setExtent(extent.expand(2));&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 13:58:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-in-zoom-out-control/m-p/112995#M10538</guid>
      <dc:creator>HemingZhu</dc:creator>
      <dc:date>2012-06-11T13:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom in Zoom out control</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-in-zoom-out-control/m-p/112996#M10539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Try this:&lt;BR /&gt;For ZoomIn Button:&lt;BR /&gt;var extent=map.extent;&lt;BR /&gt;map.setExtent(extent.expand(0.5));&lt;BR /&gt;For ZoomOut Button:&lt;BR /&gt;var extent=map.extent;&lt;BR /&gt;map.setExtent(extent.expand(2));&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot Zhu, That worked for me..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;where can i get such methods described? I was looking here &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp_start.htm"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp_start.htm&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2012 04:29:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-in-zoom-out-control/m-p/112996#M10539</guid>
      <dc:creator>PramodHarithsa1</dc:creator>
      <dc:date>2012-06-12T04:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom in Zoom out control</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-in-zoom-out-control/m-p/112997#M10540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thanks a lot Zhu, That worked for me..&lt;BR /&gt;where can i get such methods described? I was looking here &lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp_start.htm"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp_start.htm&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Under API Reference Tab looking for Geometry -&amp;gt; Extent.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2012 13:05:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-in-zoom-out-control/m-p/112997#M10540</guid>
      <dc:creator>HemingZhu</dc:creator>
      <dc:date>2012-06-12T13:05:05Z</dc:date>
    </item>
  </channel>
</rss>

