<?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 How to zoom to a location on a map in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-zoom-to-a-location-on-a-map/m-p/109129#M812</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I keep trying to zoom into a coordinate using the &lt;SPAN class="" style="color: #333333; background-color: #ffffff; font-size: 11.7px; margin-right: 2px;"&gt;&lt;A href="https://developers.arcgis.com/android/api-reference/reference/com/esri/android/map/MapView.html#zoomTo(com.esri.core.geometry.Point, float)" style="color: #006699; text-decoration: underline;"&gt;zoomTo&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #333333; background-color: #ffffff; font-size: 11.7px;"&gt;(&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/android/api-reference/reference/com/esri/core/geometry/Point.html" style="color: #006699; background-color: #ffffff; font-size: 11.7px;"&gt;Point&lt;/A&gt;&lt;SPAN style="color: #333333; background-color: #ffffff; font-size: 11.7px;"&gt; centerPt, float factor) &amp;nbsp;&lt;/SPAN&gt;public methoHowever, everytime i run my application, the map starts of the coast of africa. Has anyone had this issue before? Maybe my code is not correct.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Aug 2016 16:42:38 GMT</pubDate>
    <dc:creator>ThomasSaldana</dc:creator>
    <dc:date>2016-08-31T16:42:38Z</dc:date>
    <item>
      <title>How to zoom to a location on a map</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-zoom-to-a-location-on-a-map/m-p/109129#M812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I keep trying to zoom into a coordinate using the &lt;SPAN class="" style="color: #333333; background-color: #ffffff; font-size: 11.7px; margin-right: 2px;"&gt;&lt;A href="https://developers.arcgis.com/android/api-reference/reference/com/esri/android/map/MapView.html#zoomTo(com.esri.core.geometry.Point, float)" style="color: #006699; text-decoration: underline;"&gt;zoomTo&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #333333; background-color: #ffffff; font-size: 11.7px;"&gt;(&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/android/api-reference/reference/com/esri/core/geometry/Point.html" style="color: #006699; background-color: #ffffff; font-size: 11.7px;"&gt;Point&lt;/A&gt;&lt;SPAN style="color: #333333; background-color: #ffffff; font-size: 11.7px;"&gt; centerPt, float factor) &amp;nbsp;&lt;/SPAN&gt;public methoHowever, everytime i run my application, the map starts of the coast of africa. Has anyone had this issue before? Maybe my code is not correct.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2016 16:42:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-zoom-to-a-location-on-a-map/m-p/109129#M812</guid>
      <dc:creator>ThomasSaldana</dc:creator>
      <dc:date>2016-08-31T16:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to zoom to a location on a map</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-zoom-to-a-location-on-a-map/m-p/109130#M813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;double &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;xCoordinate &lt;/SPAN&gt;= &lt;SPAN style="color: #0000ff;"&gt;34.171604&lt;/SPAN&gt;;
&lt;SPAN style="color: #000080; font-weight: bold;"&gt;double &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;yCoordinate &lt;/SPAN&gt;= -&lt;SPAN style="color: #0000ff;"&gt;117.317647&lt;/SPAN&gt;;
Point &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;point &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Point(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;xCoordinate&lt;/SPAN&gt;,&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;yCoordinate&lt;/SPAN&gt;);


&lt;SPAN style="color: #808000;"&gt;@Override
&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;protected void &lt;/SPAN&gt;onCreate(Bundle savedInstanceState) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;super&lt;/SPAN&gt;.onCreate(savedInstanceState);
&amp;nbsp;&amp;nbsp;&amp;nbsp; setContentView(R.layout.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;activity_main&lt;/SPAN&gt;);

&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080;"&gt;//Retrieve the map and initial extent from XML layout
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;&amp;nbsp;&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;"&gt;map&lt;/SPAN&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.zoomToResolution(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;point&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;15&lt;/SPAN&gt;);



&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080;"&gt;//retrieve layer from server
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;&amp;nbsp;&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;"&gt;campus&lt;/SPAN&gt;);&lt;SPAN style="color: #808080;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;&amp;nbsp;&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;"&gt;ONDEMAND&lt;/SPAN&gt;);&lt;SPAN style="color: #808080;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //add the layer to the mapView
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;&amp;nbsp;&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;mFeatureLayer&lt;/SPAN&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mGraphicsLayer &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;GraphicsLayer();
&amp;nbsp;&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;mGraphicsLayer&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:33:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-zoom-to-a-location-on-a-map/m-p/109130#M813</guid>
      <dc:creator>ThomasSaldana</dc:creator>
      <dc:date>2021-12-11T06:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to zoom to a location on a map</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-zoom-to-a-location-on-a-map/m-p/109131#M814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #660e7a; border: 0px; font-weight: bold; font-size: 16px;"&gt;mMapView&lt;/SPAN&gt;.zoomToScale(&lt;SPAN style="color: #660e7a; border: 0px; font-weight: bold; font-size: 16px;"&gt;point&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit; font-size: 16px;"&gt;15&lt;/SPAN&gt;);

not&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #660e7a; border: 0px; font-weight: bold; font-size: 16px;"&gt;mMapView&lt;/SPAN&gt;.zoomToResolution(&lt;SPAN style="color: #660e7a; border: 0px; font-weight: bold; font-size: 16px;"&gt;point&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit; font-size: 16px;"&gt;15&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;P&gt;but it still doesnt work.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:33:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-zoom-to-a-location-on-a-map/m-p/109131#M814</guid>
      <dc:creator>ThomasSaldana</dc:creator>
      <dc:date>2021-12-11T06:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to zoom to a location on a map</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-zoom-to-a-location-on-a-map/m-p/109132#M815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your code,&amp;nbsp;looks like you have the X and Y the wrong way around, assuming that the Point you're creating is supposed to be in a geographical coordinate system - e.g. the coordinates are latitude and longitude, like from GPS position. &amp;nbsp;The X-axis of the coordinate system is&amp;nbsp;the longitude - for WGS 84 coordinate system, this would be&amp;nbsp;a value from -180 to +180, and the first parameter in point constructor is the x value. The&amp;nbsp;y-axis is latitude, -90 to +90, and the second parameter in the constructor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cant tell from your code what coordinate system your map is in - it will be the same coordinate system as that first layer that you add. So as long as that is geographic coordinate system as well, that will work - you need to zoom to a point that is in the same coordinate system as the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Shelly&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Sep 2016 10:37:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-zoom-to-a-location-on-a-map/m-p/109132#M815</guid>
      <dc:creator>ShellyGill1</dc:creator>
      <dc:date>2016-09-02T10:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to zoom to a location on a map</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-zoom-to-a-location-on-a-map/m-p/109133#M816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Sep 2016 12:45:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-zoom-to-a-location-on-a-map/m-p/109133#M816</guid>
      <dc:creator>ThomasSaldana</dc:creator>
      <dc:date>2016-09-02T12:45:37Z</dc:date>
    </item>
  </channel>
</rss>

