<?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 visibleAreaEnvelope not set after zoom in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/visibleareaenvelope-not-set-after-zoom/m-p/40356#M369</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to retrieve the visibleAreaEnvelope set after performing a zoom operation such as zoomToEnvelope or zoomToResolution etc.&amp;nbsp; The following code performs the zoom as expected, however when I query the visibleAreaEnvelope it is always the envelope that was in existence before the zoom (in my case the max envelope).&amp;nbsp;&amp;nbsp; Does the zoom have to finish before the new envelope is available?&amp;nbsp; If so, I can't find any way to determine when the map has been fully updated.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;e.g.&amp;nbsp; //In this example centre has been set to the GPS location in WKID:102100 map units&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; double zoomRes = [agsMapView minResolution];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (zoomRes &amp;lt; 2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zoomRes *= 2;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSSpatialReference *srs = [AGSSpatialReference spatialReferenceWithWKID:102100];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [agsMapView zoomToResolution:zoomRes withCenterPoint:[AGSPoint pointWithX:centre.x y:centre.y spatialReference:srs] animated:NO];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSEnvelope *envelope1 = [webMapView.agsMapView visibleAreaEnvelope];&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Apr 2014 21:31:04 GMT</pubDate>
    <dc:creator>KatherineLawler</dc:creator>
    <dc:date>2014-04-28T21:31:04Z</dc:date>
    <item>
      <title>visibleAreaEnvelope not set after zoom</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/visibleareaenvelope-not-set-after-zoom/m-p/40356#M369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to retrieve the visibleAreaEnvelope set after performing a zoom operation such as zoomToEnvelope or zoomToResolution etc.&amp;nbsp; The following code performs the zoom as expected, however when I query the visibleAreaEnvelope it is always the envelope that was in existence before the zoom (in my case the max envelope).&amp;nbsp;&amp;nbsp; Does the zoom have to finish before the new envelope is available?&amp;nbsp; If so, I can't find any way to determine when the map has been fully updated.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;e.g.&amp;nbsp; //In this example centre has been set to the GPS location in WKID:102100 map units&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; double zoomRes = [agsMapView minResolution];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (zoomRes &amp;lt; 2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zoomRes *= 2;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSSpatialReference *srs = [AGSSpatialReference spatialReferenceWithWKID:102100];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [agsMapView zoomToResolution:zoomRes withCenterPoint:[AGSPoint pointWithX:centre.x y:centre.y spatialReference:srs] animated:NO];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSEnvelope *envelope1 = [webMapView.agsMapView visibleAreaEnvelope];&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2014 21:31:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/visibleareaenvelope-not-set-after-zoom/m-p/40356#M369</guid>
      <dc:creator>KatherineLawler</dc:creator>
      <dc:date>2014-04-28T21:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: visibleAreaEnvelope not set after zoom</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/visibleareaenvelope-not-set-after-zoom/m-p/40357#M370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, you'll have to wait for zoom to finish to fetch new visibleAreaEnvelope. You should listen to the AGSMapViewDidEndZoomingNotification (&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://developers.arcgis.com/ios/api-reference/interface_a_g_s_map_view.html" rel="nofollow" target="_blank"&gt;AGSMapView&lt;/A&gt;&lt;SPAN&gt; doc).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nimesh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2014 15:00:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/visibleareaenvelope-not-set-after-zoom/m-p/40357#M370</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2014-04-29T15:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: visibleAreaEnvelope not set after zoom</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/visibleareaenvelope-not-set-after-zoom/m-p/40358#M371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Nimesh,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was hoping to avoid that but it does work.&amp;nbsp; Since in my case I need to know right away I have to wait for it in a background thread which is a bit messy but does work.&amp;nbsp; It would be nice if there were similar routines as there are for MapKit where you can query what the resulting limits will be given a new envelope before actually setting it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kathy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2014 01:50:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/visibleareaenvelope-not-set-after-zoom/m-p/40358#M371</guid>
      <dc:creator>KatherineLawler</dc:creator>
      <dc:date>2014-04-30T01:50:11Z</dc:date>
    </item>
  </channel>
</rss>

