<?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: Simple Graphic doesn't display on map in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/simple-graphic-doesn-t-display-on-map/m-p/668425#M4639</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sean,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's a difference in the input parameters of MapView.centerAt vs GeometryEngine.project. The project method takes in an x-coordinate and a y-coordinate as parameters; however, centerAt takes in latitude and longitude. Also, note that&amp;nbsp;latitude relates to the y-coordinate (north-south axis), and longitude relates to x-coordinate (east-west axis). This would explain why your&amp;nbsp;centerAt works as you expect but your project does not - you might have a graphic being drawn, but just not where you expect to see it, due to this order of parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you pass in lat/long values, make sure you pass in the parameters the correct way around - e.g.&lt;/P&gt;&lt;PRE style="color: #000000; background-color: #ffffff; font-size: 9.0pt;"&gt;Point gps_mercator = GeometryEngine.&lt;SPAN&gt;project&lt;/SPAN&gt;(longitude, latitude, &lt;SPAN style="background-color: #e4e4ff;"&gt;webSR&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Shelly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Dec 2016 12:31:28 GMT</pubDate>
    <dc:creator>ShellyGill1</dc:creator>
    <dc:date>2016-12-13T12:31:28Z</dc:date>
    <item>
      <title>Simple Graphic doesn't display on map</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/simple-graphic-doesn-t-display-on-map/m-p/668424#M4638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using ArcGIS for Android SDK 10.2.8 and trying to place a simple graphic based on current GPS coordinates obtained through Android's location services. I followed the basic guide here:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/android/10-2/guide/add-graphics-and-text-to-graphic-overlays.htm" title="https://developers.arcgis.com/android/10-2/guide/add-graphics-and-text-to-graphic-overlays.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Add graphics and text—ArcGIS Runtime SDK for Android | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using ESRI's topo basemap. The map loads as expected and initially centers on the GPS&amp;nbsp;coordinates provided. On pressing a provided button, the map should draw a SimpleMarkerSymbol at the coordinates and re-center the map on the coordinates, if the map has been moved. What actually happens when I press the button is the map will re-center on the coordinates but no graphic appears.&lt;/P&gt;&lt;P&gt;To do a little testing, I tried also displaying a toast with the graphic layer UID. It returns a number, leading me to believe the graphic layer is correctly created....but still no graphic appears on the map. Is there something I am missing in my code? My code for the button is below:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;public void &lt;/SPAN&gt;setPoint(View view) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; Button clickedButton = (Button) view;

&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;if &lt;/SPAN&gt;(clickedButton == findViewById(R.id.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;add_point&lt;/SPAN&gt;)) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;);&lt;SPAN style="color: #808080;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;SpatialReference webSR = SpatialReference.&lt;SPAN&gt;create&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;3857&lt;/SPAN&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Point gps_mercator = GeometryEngine.&lt;SPAN&gt;project&lt;/SPAN&gt;(&lt;SPAN style="color: #660e7a;"&gt;latitude&lt;/SPAN&gt;, &lt;SPAN style="color: #660e7a;"&gt;longitude&lt;/SPAN&gt;, webSR);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GraphicsLayer gl = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;GraphicsLayer();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SimpleMarkerSymbol simpleMarker = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;SimpleMarkerSymbol(Color.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;RED&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;5&lt;/SPAN&gt;, SimpleMarkerSymbol.STYLE.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;CIRCLE&lt;/SPAN&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Graphic pointGraphic = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Graphic(gps_mercator, simpleMarker);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gl.addGraphic(pointGraphic);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.addLayer(gl);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.centerAt(&lt;SPAN style="color: #660e7a;"&gt;latitude&lt;/SPAN&gt;, &lt;SPAN style="color: #660e7a;"&gt;longitude&lt;/SPAN&gt;, &lt;SPAN style="color: #000080; font-weight: bold;"&gt;true&lt;/SPAN&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:14:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/simple-graphic-doesn-t-display-on-map/m-p/668424#M4638</guid>
      <dc:creator>SeanPearson1</dc:creator>
      <dc:date>2021-12-12T04:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Graphic doesn't display on map</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/simple-graphic-doesn-t-display-on-map/m-p/668425#M4639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sean,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's a difference in the input parameters of MapView.centerAt vs GeometryEngine.project. The project method takes in an x-coordinate and a y-coordinate as parameters; however, centerAt takes in latitude and longitude. Also, note that&amp;nbsp;latitude relates to the y-coordinate (north-south axis), and longitude relates to x-coordinate (east-west axis). This would explain why your&amp;nbsp;centerAt works as you expect but your project does not - you might have a graphic being drawn, but just not where you expect to see it, due to this order of parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you pass in lat/long values, make sure you pass in the parameters the correct way around - e.g.&lt;/P&gt;&lt;PRE style="color: #000000; background-color: #ffffff; font-size: 9.0pt;"&gt;Point gps_mercator = GeometryEngine.&lt;SPAN&gt;project&lt;/SPAN&gt;(longitude, latitude, &lt;SPAN style="background-color: #e4e4ff;"&gt;webSR&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Shelly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2016 12:31:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/simple-graphic-doesn-t-display-on-map/m-p/668425#M4639</guid>
      <dc:creator>ShellyGill1</dc:creator>
      <dc:date>2016-12-13T12:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Graphic doesn't display on map</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/simple-graphic-doesn-t-display-on-map/m-p/668426#M4640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is exactly what I was doing wrong. I reversed the order as indicated in your line of code and it worked! Thank you for the helpful explanation!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2016 18:04:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/simple-graphic-doesn-t-display-on-map/m-p/668426#M4640</guid>
      <dc:creator>SeanPearson1</dc:creator>
      <dc:date>2016-12-13T18:04:20Z</dc:date>
    </item>
  </channel>
</rss>

