<?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 Graphic always shows at mappoint 0,0 while using latitude and longitude in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/graphic-always-shows-at-mappoint-0-0-while-using/m-p/370763#M2465</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi I am using this code to add a Text SYmbol at given latitude and longitude.(San Francisco)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TextSymbol txtSymbol = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;TextSymbol(&lt;SPAN style="color: #0000ff;"&gt;30&lt;/SPAN&gt;, &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"50"&lt;/SPAN&gt;, Color.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;BLUE&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Point mapPoint = ConvertMyLocationPoint(-&lt;SPAN style="color: #0000ff;"&gt;122.4600595&lt;/SPAN&gt;,&lt;SPAN style="color: #0000ff;"&gt;37.7532508&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gr &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Graphic((mapPoint), txtSymbol);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphicsLayer &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;GraphicsLayer();&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //add the graphic to the map&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;graphicsLayer&lt;/SPAN&gt;.addGraphic(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;gr&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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;.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;SPAN style="color: #000080; font-weight: bold;"&gt;private &lt;/SPAN&gt;Point ConvertMyLocationPoint(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;final double &lt;/SPAN&gt;longitude, &lt;SPAN style="color: #000080; font-weight: bold;"&gt;final double &lt;/SPAN&gt;latitude) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; Point wgspoint = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Point(longitude, latitude);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Point mapPoint = GeometryEngine.&lt;SPAN style="font-style: italic;"&gt;project&lt;/SPAN&gt;(longitude,latitude,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.getSpatialReference());&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;return &lt;/SPAN&gt;mapPoint;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The point always shows up at 0,0(lat, long) in the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a wrong way to add point when I have latitude and longitude?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone suggest how to approach this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 May 2016 11:20:00 GMT</pubDate>
    <dc:creator>DeepakBhatia</dc:creator>
    <dc:date>2016-05-12T11:20:00Z</dc:date>
    <item>
      <title>Graphic always shows at mappoint 0,0 while using latitude and longitude</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/graphic-always-shows-at-mappoint-0-0-while-using/m-p/370763#M2465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi I am using this code to add a Text SYmbol at given latitude and longitude.(San Francisco)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TextSymbol txtSymbol = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;TextSymbol(&lt;SPAN style="color: #0000ff;"&gt;30&lt;/SPAN&gt;, &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"50"&lt;/SPAN&gt;, Color.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;BLUE&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Point mapPoint = ConvertMyLocationPoint(-&lt;SPAN style="color: #0000ff;"&gt;122.4600595&lt;/SPAN&gt;,&lt;SPAN style="color: #0000ff;"&gt;37.7532508&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gr &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Graphic((mapPoint), txtSymbol);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphicsLayer &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;GraphicsLayer();&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //add the graphic to the map&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;graphicsLayer&lt;/SPAN&gt;.addGraphic(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;gr&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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;.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;SPAN style="color: #000080; font-weight: bold;"&gt;private &lt;/SPAN&gt;Point ConvertMyLocationPoint(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;final double &lt;/SPAN&gt;longitude, &lt;SPAN style="color: #000080; font-weight: bold;"&gt;final double &lt;/SPAN&gt;latitude) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; Point wgspoint = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Point(longitude, latitude);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Point mapPoint = GeometryEngine.&lt;SPAN style="font-style: italic;"&gt;project&lt;/SPAN&gt;(longitude,latitude,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.getSpatialReference());&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;return &lt;/SPAN&gt;mapPoint;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The point always shows up at 0,0(lat, long) in the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a wrong way to add point when I have latitude and longitude?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone suggest how to approach this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2016 11:20:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/graphic-always-shows-at-mappoint-0-0-while-using/m-p/370763#M2465</guid>
      <dc:creator>DeepakBhatia</dc:creator>
      <dc:date>2016-05-12T11:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Graphic always shows at mappoint 0,0 while using latitude and longitude</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/graphic-always-shows-at-mappoint-0-0-while-using/m-p/370764#M2466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Deepak,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could see anything that looked wrong with your code - I put this into an app, and found the '50' text symbol displays at San Francisco as expected. The ConvertMyLocationPoint function returned a Point like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mapPoint.getX() - -1.3632191466053985E7&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mapPoint.getY() - 4544626.829865076&lt;/P&gt;&lt;P&gt;How is your MapView defined? That's where the coordinate system is being taken from, so I wonder if that is the problem in your case. Here is the MapView definition I was using - as I'm using the Esri basemaps, the spatial reference is Web Mercator Auxiliary Sphere (id = 102100).&lt;/P&gt;&lt;P&gt;&amp;lt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;com.&lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #e4e4ff; font-weight: bold;"&gt;esri&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;.android.map.MapView&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;android&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-weight: bold;"&gt;:id=&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"@+id/map"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;android&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-weight: bold;"&gt;:layout_width=&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"fill_parent"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;android&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-weight: bold;"&gt;:layout_height=&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"fill_parent"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-weight: bold;"&gt;mapoptions.MapType=&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"Streets"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-weight: bold;"&gt;mapoptions.ZoomLevel=&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"1"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;/&amp;gt;&lt;/P&gt;&lt;P&gt;What is the Spatial Reference that you're projecting the point to? Does the returned Point definately have 0,0 as coordinates? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shelly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2016 09:55:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/graphic-always-shows-at-mappoint-0-0-while-using/m-p/370764#M2466</guid>
      <dc:creator>ShellyGill1</dc:creator>
      <dc:date>2016-05-17T09:55:26Z</dc:date>
    </item>
  </channel>
</rss>

