<?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: converting zoom level between maps in Spatial Statistics Questions</title>
    <link>https://community.esri.com/t5/spatial-statistics-questions/converting-zoom-level-between-maps/m-p/62665#M218</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Got a solution.&amp;nbsp; It's a little complicated, but it works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Get &amp;amp; save a polygon enclosing the current display of the MapView. (MapView.getExtent() returns a polygon you can use.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Trash the MapView from the display.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) Dynamically create a new a new MapView object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4) Load the new map in the MapView.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;5) Get the saved polygon from step 1 and convert it to be in the same spatial reference as the new map.&amp;nbsp; (GeometryEngine.project() will do this for you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;6) Pass the new polygon to the setExtent method of the new MapView.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;*You can replace steps 2 - 4 by loading the new map and resetting the spatial reference and resolution manually.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The GeometryEngine.project method can throw an IndexOutOfBoundsException if you are at a map's maximum resolution.&amp;nbsp; I have a try/catch listen for this and then just call myMapView.setResolution(myMapView.getMaxResolution) to make sure I'm zoom all the way out.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 May 2013 19:21:23 GMT</pubDate>
    <dc:creator>RemmieVail</dc:creator>
    <dc:date>2013-05-09T19:21:23Z</dc:date>
    <item>
      <title>converting zoom level between maps</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/converting-zoom-level-between-maps/m-p/62664#M217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry, noob question here.&amp;nbsp; How can I convert the zoom level between maps with different spatial references?&amp;nbsp; For example, if someone zooms into Chicago, and then switch maps I want the new map to be zoomed into Chicago as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've been looking into the spatial reference scale &amp;amp; resolution properties, but haven't been able to get it working.&amp;nbsp; My other thought was to create an envelope using the 4 points at the corners of the display, and create a new envelope from converted point values when the new map is opened.&amp;nbsp; Any thoughts? Suggestions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;eimmer&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 May 2013 03:09:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/converting-zoom-level-between-maps/m-p/62664#M217</guid>
      <dc:creator>RemmieVail</dc:creator>
      <dc:date>2013-05-03T03:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: converting zoom level between maps</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/converting-zoom-level-between-maps/m-p/62665#M218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Got a solution.&amp;nbsp; It's a little complicated, but it works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Get &amp;amp; save a polygon enclosing the current display of the MapView. (MapView.getExtent() returns a polygon you can use.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Trash the MapView from the display.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) Dynamically create a new a new MapView object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4) Load the new map in the MapView.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;5) Get the saved polygon from step 1 and convert it to be in the same spatial reference as the new map.&amp;nbsp; (GeometryEngine.project() will do this for you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;6) Pass the new polygon to the setExtent method of the new MapView.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;*You can replace steps 2 - 4 by loading the new map and resetting the spatial reference and resolution manually.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The GeometryEngine.project method can throw an IndexOutOfBoundsException if you are at a map's maximum resolution.&amp;nbsp; I have a try/catch listen for this and then just call myMapView.setResolution(myMapView.getMaxResolution) to make sure I'm zoom all the way out.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 19:21:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/converting-zoom-level-between-maps/m-p/62665#M218</guid>
      <dc:creator>RemmieVail</dc:creator>
      <dc:date>2013-05-09T19:21:23Z</dc:date>
    </item>
  </channel>
</rss>

