<?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: GeometryEngine.project - YUNOwork? ^^ in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/geometryengine-project-yunowork/m-p/743630#M5227</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Update: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found out that I can project my location to the right coordinates, but no luck in projecting the manually inserted point :S&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;this works: (but the code I posted above doesn't...)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
double locy = loc.getLatitude();
double locx = loc.getLongitude();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
System.out.println("Pos before"+locx); // 27.4661603
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
Point wgspoint = new Point(locx, locy);
Point mapPoint = (Point) GeometryEngine
&amp;nbsp;&amp;nbsp; .project(wgspoint,
&amp;nbsp;&amp;nbsp; SpatialReference.create(4326),
mMapView.getSpatialReference());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
System.out.println("Pos after"+mapPoint.getX()); //3057518.978642426
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 07:38:52 GMT</pubDate>
    <dc:creator>AxelBronder1</dc:creator>
    <dc:date>2021-12-12T07:38:52Z</dc:date>
    <item>
      <title>GeometryEngine.project - YUNOwork? ^^</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/geometryengine-project-yunowork/m-p/743629#M5226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey guys, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;can´t seem to be able to project my GPS coordinated from Google maps to map coordinates. What am I doing wrong?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;here le code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Point wgspnt = new Point();
wgspnt.setXY(-29.34016, 27.466609);
//Google maps: We use EPSG:4326 (WGS 84) for coordinates (Lat/Long). The projection we use is Mercator (EPSG:3857)
&amp;nbsp; 
Log.i(TAG, "wgsLatBEFORE=" + wgspnt.getX()); //wgsLatBEFORE=-29.34016
&amp;nbsp; 
Point mapPoint = (Point) GeometryEngine.project(wgspnt, SpatialReference.create(4326), mMapView.getSpatialReference()); 
//have also tried from 3857, with the same result
&amp;nbsp; 
Log.i(TAG, "wgsLatAFTER=" + mapPoint.getX()); //wgsLatBEFORE=-29.34016 (STILL!)
&amp;nbsp; 
Graphic poi1 = new Graphic(mapPoint, marker);
gLayer.addGraphic(poi1);
mMapView.addLayer(gLayer);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To me, GeometryEngine.project seem to do nothing here and the point ends up close to 0.0 instead of in Lesotho.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; I am also displaying a point in Switzerland that ends up in the right place: &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;Point chPoint = new Point (947296, 6008979);&lt;/SPAN&gt;&lt;SPAN&gt; so thats the type of coordinates I want to project into.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Mar 2013 05:19:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/geometryengine-project-yunowork/m-p/743629#M5226</guid>
      <dc:creator>AxelBronder1</dc:creator>
      <dc:date>2013-03-05T05:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryEngine.project - YUNOwork? ^^</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/geometryengine-project-yunowork/m-p/743630#M5227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Update: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found out that I can project my location to the right coordinates, but no luck in projecting the manually inserted point :S&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;this works: (but the code I posted above doesn't...)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
double locy = loc.getLatitude();
double locx = loc.getLongitude();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
System.out.println("Pos before"+locx); // 27.4661603
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
Point wgspoint = new Point(locx, locy);
Point mapPoint = (Point) GeometryEngine
&amp;nbsp;&amp;nbsp; .project(wgspoint,
&amp;nbsp;&amp;nbsp; SpatialReference.create(4326),
mMapView.getSpatialReference());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
System.out.println("Pos after"+mapPoint.getX()); //3057518.978642426
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:38:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/geometryengine-project-yunowork/m-p/743630#M5227</guid>
      <dc:creator>AxelBronder1</dc:creator>
      <dc:date>2021-12-12T07:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryEngine.project - YUNOwork? ^^</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/geometryengine-project-yunowork/m-p/743631#M5228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Solved;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;turns out the graphicalLayer gets drawn before the mapsurface spatial reference is initialized.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;Point mapPointNew = (Point) GeometryEngine.project(wgspnt, SpatialReference.create(4326), &lt;STRONG&gt;SpatialReference.create(3857)&lt;/STRONG&gt;);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;finally did the trick... thought I had tried this already...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Mar 2013 12:59:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/geometryengine-project-yunowork/m-p/743631#M5228</guid>
      <dc:creator>AxelBronder1</dc:creator>
      <dc:date>2013-03-05T12:59:39Z</dc:date>
    </item>
  </channel>
</rss>

