<?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 MapView.SetExtent problem in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/mapview-setextent-problem/m-p/45547#M376</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm making a simple app to Query Features (Polygons) and then zoom to results , but when it zooms the zoom is too far (no envelope padding in the setExtent method ) , I barely see the feature , and it doesn't zoom more than this even with the manual double tap technique &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Untitled.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/117907_Untitled.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Here is the code : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;public class &lt;/SPAN&gt;MainActivity &lt;SPAN style="color: #000080; font-weight: bold;"&gt;extends &lt;/SPAN&gt;ActionBarActivity {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; MapView &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ArcGISFeatureLayer &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mFeatureLayer&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; GraphicsLayer &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;graphicsLayer&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;boolean &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mIsMapLoaded&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; String &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mFeatureServiceURL&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; EditText &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;queryText&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;public void &lt;/SPAN&gt;onSubmit(View view){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;//reference the values&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;queryText &lt;/SPAN&gt;= (EditText) findViewById(R.id.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;queryText&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;QueryFeatureLayer().execute(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;queryText&lt;/SPAN&gt;.getText().toString());&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;class &lt;/SPAN&gt;QueryFeatureLayer &lt;SPAN style="color: #000080; font-weight: bold;"&gt;extends &lt;/SPAN&gt;AsyncTask&amp;lt;String, Void, FeatureResult&amp;gt; {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808000;"&gt;@Override&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808000;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;protected &lt;/SPAN&gt;FeatureResult doInBackground(String... params) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; String whereClause = &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"name ='" &lt;/SPAN&gt;+ params[&lt;SPAN style="color: #0000ff;"&gt;0&lt;/SPAN&gt;] + &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"'"&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// Define a new query and set parameters&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;QueryParameters mParams = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;QueryParameters();&lt;/P&gt;&lt;P&gt;&amp;nbsp; mParams.setWhere(whereClause);&lt;/P&gt;&lt;P&gt;&amp;nbsp; mParams.setReturnGeometry(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;true&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// Define the new instance of QueryTask&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;QueryTask queryTask = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;QueryTask(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mFeatureServiceURL&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp; FeatureResult results;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;try &lt;/SPAN&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// run the querytask&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;results = queryTask.execute(mParams);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;return &lt;/SPAN&gt;results;&lt;/P&gt;&lt;P&gt;&amp;nbsp; } &lt;SPAN style="color: #000080; font-weight: bold;"&gt;catch &lt;/SPAN&gt;(Exception e) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; e.printStackTrace();&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;return null&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808000;"&gt;@Override&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808000;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;protected void &lt;/SPAN&gt;onPostExecute(FeatureResult results) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;super&lt;/SPAN&gt;.onPostExecute(results);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// Remove the result from previously run query task&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;graphicsLayer&lt;/SPAN&gt;.removeAll();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// Define a new marker symbol for the result graphics&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;SimpleMarkerSymbol sms = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;SimpleMarkerSymbol(Color.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;BLUE&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;10&lt;/SPAN&gt;, SimpleMarkerSymbol.STYLE.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;CIRCLE&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp; SimpleFillSymbol fsymbol = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;SimpleFillSymbol(Color.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;RED&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// Envelope to focus on the map extent on the results&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Envelope extent = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Envelope();&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp; // iterate through results&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;for &lt;/SPAN&gt;(Object element : results) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// if object is feature cast to feature&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;if &lt;/SPAN&gt;(element &lt;SPAN style="color: #000080; font-weight: bold;"&gt;instanceof &lt;/SPAN&gt;Feature) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; Feature feature = (Feature) element;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// convert feature to graphic&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Graphic graphic = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Graphic(feature.getGeometry(), feature.getSymbol(), feature.getAttributes());&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.setExtent(feature.getGeometry());&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// add it to the layer&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;graphicsLayer&lt;/SPAN&gt;.addGraphic(graphic);&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808000;"&gt;@Override&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808000;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;protected void &lt;/SPAN&gt;onCreate(Bundle savedInstanceState) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;super&lt;/SPAN&gt;.onCreate(savedInstanceState);&lt;/P&gt;&lt;P&gt;&amp;nbsp; setContentView(R.layout.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;activity_main&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;final &lt;/SPAN&gt;MapOptions mStreetsBasemap = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;MapOptions(MapOptions.MapType.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;STREETS&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// Retrieve the map and initial extent from XML layout&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView &lt;/SPAN&gt;= (MapView) findViewById(R.id.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;map&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// Get the feature service URL from values-&amp;gt;strings.xml&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mFeatureServiceURL &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;this&lt;/SPAN&gt;.getResources().getString(R.string.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;featureServiceURL&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// Add Feature layer to the MapView&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mFeatureLayer &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ArcGISFeatureLayer(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mFeatureServiceURL&lt;/SPAN&gt;, ArcGISFeatureLayer.MODE.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;ONDEMAND&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.addLayer(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mFeatureLayer&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// Add Graphics layer to the MapView&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;SimpleRenderer sr = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;SimpleRenderer(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;SimpleFillSymbol(Color.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;RED&lt;/SPAN&gt;));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;graphicsLayer&lt;/SPAN&gt;.setRenderer(sr);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;//mGraphicsLayer = new GraphicsLayer();&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.addLayer(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;graphicsLayer&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;//add the code below to set a listener that will be called when the MapView is initialized.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp; // You will check this in a later step to see if the map is ready for a user to make queries.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.&lt;SPAN style="background-color: #e4e4ff;"&gt;setOnStatusChangedListener&lt;/SPAN&gt;(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;OnStatusChangedListener() {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;public void &lt;/SPAN&gt;onStatusChanged(Object source, STATUS status) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;if &lt;/SPAN&gt;((source == &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;) &amp;amp;&amp;amp; (status == OnStatusChangedListener.STATUS.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;INITIALIZED&lt;/SPAN&gt;)) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mIsMapLoaded &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;true&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Jul 2015 05:56:32 GMT</pubDate>
    <dc:creator>husseinemam1</dc:creator>
    <dc:date>2015-07-20T05:56:32Z</dc:date>
    <item>
      <title>MapView.SetExtent problem</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/mapview-setextent-problem/m-p/45547#M376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm making a simple app to Query Features (Polygons) and then zoom to results , but when it zooms the zoom is too far (no envelope padding in the setExtent method ) , I barely see the feature , and it doesn't zoom more than this even with the manual double tap technique &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Untitled.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/117907_Untitled.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Here is the code : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;public class &lt;/SPAN&gt;MainActivity &lt;SPAN style="color: #000080; font-weight: bold;"&gt;extends &lt;/SPAN&gt;ActionBarActivity {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; MapView &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ArcGISFeatureLayer &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mFeatureLayer&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; GraphicsLayer &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;graphicsLayer&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;boolean &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mIsMapLoaded&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; String &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mFeatureServiceURL&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; EditText &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;queryText&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;public void &lt;/SPAN&gt;onSubmit(View view){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;//reference the values&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;queryText &lt;/SPAN&gt;= (EditText) findViewById(R.id.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;queryText&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;QueryFeatureLayer().execute(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;queryText&lt;/SPAN&gt;.getText().toString());&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;class &lt;/SPAN&gt;QueryFeatureLayer &lt;SPAN style="color: #000080; font-weight: bold;"&gt;extends &lt;/SPAN&gt;AsyncTask&amp;lt;String, Void, FeatureResult&amp;gt; {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808000;"&gt;@Override&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808000;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;protected &lt;/SPAN&gt;FeatureResult doInBackground(String... params) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; String whereClause = &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"name ='" &lt;/SPAN&gt;+ params[&lt;SPAN style="color: #0000ff;"&gt;0&lt;/SPAN&gt;] + &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"'"&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// Define a new query and set parameters&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;QueryParameters mParams = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;QueryParameters();&lt;/P&gt;&lt;P&gt;&amp;nbsp; mParams.setWhere(whereClause);&lt;/P&gt;&lt;P&gt;&amp;nbsp; mParams.setReturnGeometry(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;true&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// Define the new instance of QueryTask&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;QueryTask queryTask = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;QueryTask(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mFeatureServiceURL&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp; FeatureResult results;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;try &lt;/SPAN&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// run the querytask&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;results = queryTask.execute(mParams);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;return &lt;/SPAN&gt;results;&lt;/P&gt;&lt;P&gt;&amp;nbsp; } &lt;SPAN style="color: #000080; font-weight: bold;"&gt;catch &lt;/SPAN&gt;(Exception e) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; e.printStackTrace();&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;return null&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808000;"&gt;@Override&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808000;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;protected void &lt;/SPAN&gt;onPostExecute(FeatureResult results) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;super&lt;/SPAN&gt;.onPostExecute(results);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// Remove the result from previously run query task&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;graphicsLayer&lt;/SPAN&gt;.removeAll();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// Define a new marker symbol for the result graphics&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;SimpleMarkerSymbol sms = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;SimpleMarkerSymbol(Color.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;BLUE&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;10&lt;/SPAN&gt;, SimpleMarkerSymbol.STYLE.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;CIRCLE&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp; SimpleFillSymbol fsymbol = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;SimpleFillSymbol(Color.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;RED&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// Envelope to focus on the map extent on the results&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Envelope extent = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Envelope();&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp; // iterate through results&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;for &lt;/SPAN&gt;(Object element : results) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// if object is feature cast to feature&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;if &lt;/SPAN&gt;(element &lt;SPAN style="color: #000080; font-weight: bold;"&gt;instanceof &lt;/SPAN&gt;Feature) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; Feature feature = (Feature) element;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// convert feature to graphic&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Graphic graphic = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Graphic(feature.getGeometry(), feature.getSymbol(), feature.getAttributes());&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.setExtent(feature.getGeometry());&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// add it to the layer&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;graphicsLayer&lt;/SPAN&gt;.addGraphic(graphic);&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808000;"&gt;@Override&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808000;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;protected void &lt;/SPAN&gt;onCreate(Bundle savedInstanceState) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;super&lt;/SPAN&gt;.onCreate(savedInstanceState);&lt;/P&gt;&lt;P&gt;&amp;nbsp; setContentView(R.layout.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;activity_main&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;final &lt;/SPAN&gt;MapOptions mStreetsBasemap = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;MapOptions(MapOptions.MapType.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;STREETS&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// Retrieve the map and initial extent from XML layout&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView &lt;/SPAN&gt;= (MapView) findViewById(R.id.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;map&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// Get the feature service URL from values-&amp;gt;strings.xml&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mFeatureServiceURL &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;this&lt;/SPAN&gt;.getResources().getString(R.string.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;featureServiceURL&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// Add Feature layer to the MapView&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mFeatureLayer &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ArcGISFeatureLayer(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mFeatureServiceURL&lt;/SPAN&gt;, ArcGISFeatureLayer.MODE.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;ONDEMAND&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.addLayer(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mFeatureLayer&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// Add Graphics layer to the MapView&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;SimpleRenderer sr = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;SimpleRenderer(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;SimpleFillSymbol(Color.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;RED&lt;/SPAN&gt;));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;graphicsLayer&lt;/SPAN&gt;.setRenderer(sr);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;//mGraphicsLayer = new GraphicsLayer();&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.addLayer(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;graphicsLayer&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;//add the code below to set a listener that will be called when the MapView is initialized.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp; // You will check this in a later step to see if the map is ready for a user to make queries.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.&lt;SPAN style="background-color: #e4e4ff;"&gt;setOnStatusChangedListener&lt;/SPAN&gt;(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;OnStatusChangedListener() {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;public void &lt;/SPAN&gt;onStatusChanged(Object source, STATUS status) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;if &lt;/SPAN&gt;((source == &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;) &amp;amp;&amp;amp; (status == OnStatusChangedListener.STATUS.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;INITIALIZED&lt;/SPAN&gt;)) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mIsMapLoaded &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;true&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2015 05:56:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/mapview-setextent-problem/m-p/45547#M376</guid>
      <dc:creator>husseinemam1</dc:creator>
      <dc:date>2015-07-20T05:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: MapView.SetExtent problem</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/mapview-setextent-problem/m-p/45548#M377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried this?&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Collect all of the extents of the selected features into a Geometry[] array&lt;/LI&gt;&lt;LI&gt;Use GeometryEngine to union all the extends into one Geometry&lt;/LI&gt;&lt;LI&gt;Use the extent of the resulting Polygon as the new extent for your MapView.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That might be one way to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might also be able to call merge(), merging each Envelope with the next until you've merged them all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 22:45:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/mapview-setextent-problem/m-p/45548#M377</guid>
      <dc:creator>EricBader</dc:creator>
      <dc:date>2015-08-07T22:45:29Z</dc:date>
    </item>
  </channel>
</rss>

