<?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: Android ArcGis map auto zooms out on activity resume in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/android-arcgis-map-auto-zooms-out-on-activity/m-p/588279#M4044</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess you need to use&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #660e7a; border: 0px; font-weight: inherit; font-size: 12px;"&gt;mMapView&lt;/SPAN&gt;.getMap().setInitialViewpoint() 

when you start your activity. Using this your map will not zoomed out when your activity resumed.&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 01:16:22 GMT</pubDate>
    <dc:creator>SahilGarg</dc:creator>
    <dc:date>2021-12-12T01:16:22Z</dc:date>
    <item>
      <title>Android ArcGis map auto zooms out on activity resume</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/android-arcgis-map-auto-zooms-out-on-activity/m-p/588278#M4043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The first time I resume activity, the map zooms out to a larger extent. Example, I view the map the first time, it centers and zooms in on user location. Then I leave the activity, return to the activity, and it zooms out to the map's default extent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my onCreate, I am&amp;nbsp;loading map layers via MMPK and then calling the following afterwards.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a;"&gt;mMapView&lt;/SPAN&gt;.getMap().setBasemap(Basemap.&lt;SPAN&gt;createImagery&lt;/SPAN&gt;());
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a;"&gt;mMapView&lt;/SPAN&gt;.setViewpointScaleAsync(&lt;SPAN style="color: #0000ff;"&gt;4622324&lt;/SPAN&gt;);

&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mLocationDisplay&lt;/SPAN&gt;.setAutoPanMode(LocationDisplay.AutoPanMode.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;RECENTER&lt;/SPAN&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;if &lt;/SPAN&gt;(!&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mLocationDisplay&lt;/SPAN&gt;.isStarted())
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mLocationDisplay&lt;/SPAN&gt;.startAsync();&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this issue only occurs on the first time I resume activity. After recentering or zooming/moving the map following the autozoom, there's no more issues with the auto zoom to map extent when I leave the activity a 2nd time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:16:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/android-arcgis-map-auto-zooms-out-on-activity/m-p/588278#M4043</guid>
      <dc:creator>AnousoneBounket</dc:creator>
      <dc:date>2021-12-12T01:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Android ArcGis map auto zooms out on activity resume</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/android-arcgis-map-auto-zooms-out-on-activity/m-p/588279#M4044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess you need to use&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #660e7a; border: 0px; font-weight: inherit; font-size: 12px;"&gt;mMapView&lt;/SPAN&gt;.getMap().setInitialViewpoint() 

when you start your activity. Using this your map will not zoomed out when your activity resumed.&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:16:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/android-arcgis-map-auto-zooms-out-on-activity/m-p/588279#M4044</guid>
      <dc:creator>SahilGarg</dc:creator>
      <dc:date>2021-12-12T01:16:22Z</dc:date>
    </item>
  </channel>
</rss>

