<?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: How to give routes using LatLng points? in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-give-routes-using-latlng-points/m-p/546965#M3735</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/255252"&gt;Malcolm Dorn&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would look to converting the lat/long to what the coordinate system you are using uses. &amp;nbsp;The easiest way to do this is to use the geometry engine and project the lat/long to the coordinates of the routing system you are using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can construct your point using a Point object and then call the project method here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Project(Geometry Engine)&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/geometry/GeometryEngine.html#project(com.esri.arcgisruntime.geometry.Geometry,%20com.esri.arcgisruntime.geometry.SpatialReference)"&gt;https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/geometry/GeometryEngine.html#project(com.esri.arcgisruntime.geometry.Geometry&lt;SPAN&gt;, com.esri.arcgisruntime.geometry.SpatialReference)&lt;/SPAN&gt;&lt;/A&gt;&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, 10 Feb 2017 18:39:15 GMT</pubDate>
    <dc:creator>AlexanderNohe1</dc:creator>
    <dc:date>2017-02-10T18:39:15Z</dc:date>
    <item>
      <title>How to give routes using LatLng points?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-give-routes-using-latlng-points/m-p/546964#M3734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am new to ArcGIS but have followed the guide at &lt;A class="link-titled" href="https://developers.arcgis.com/android/latest/guide/find-a-route.htm#ESRI_SECTION1_1A0EC7FB301C40EC96C1013783CA63C6" title="https://developers.arcgis.com/android/latest/guide/find-a-route.htm#ESRI_SECTION1_1A0EC7FB301C40EC96C1013783CA63C6"&gt;Find a route—ArcGIS Runtime SDK for Android | ArcGIS for Developers&lt;/A&gt;&amp;nbsp; to route from one location to another but the guide uses a projected coordinate system in California. I want to, ideally, be able to give route parameters using LatLng or at least be able to convert from LatLng to something else? Will the API not accept LatLng points? I want to route in the United Kingdom so, accordiing to &lt;A class="link-titled" href="http://communityhub.esriuk.com/geoxchange/2012/3/26/coordinate-systems-and-projections-for-beginners.html" title="http://communityhub.esriuk.com/geoxchange/2012/3/26/coordinate-systems-and-projections-for-beginners.html"&gt;Coordinate systems and projections for beginners — Esri UK&lt;/A&gt;&amp;nbsp; this would mean I need to convert WKID 4326 into WKID 102100 or 3857?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the example I can give 2 stops as follows:&lt;/P&gt;&lt;P&gt;Stop stop1 = new Stop(new Point(-13046294.924, 4036100.529, SpatialReferences.getWebMercator()));&lt;BR /&gt;Stop stop2 = new Stop(new Point(-13046094.899, 4036273.038, SpatialReferences.getWebMercator()));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if I give these stops, also in California, using LatLng:&lt;/P&gt;&lt;P&gt;Stop stop1 = new Stop(new Point(32.863797, -117.205879, SpatialReferences.getWgs84() ));&lt;BR /&gt;Stop stop2 = new Stop(new Point(32.902620, -117.150526, SpatialReferences.getWgs84() ));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.... no matter what spatial reference or lack of I use, it returns&amp;nbsp;java.util.concurrent.ExecutionException: com.esri.arcgisruntime.io.JsonEmbeddedException: Unable to complete operation when I call RouteResult routeResult = routeResultFuture.get();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I guess something it wrong with my query to the API? What am I supposed to do to query using LatLng? I am using the following route service proxy (minus my personal key):&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://utility.arcgis.com/usrsvcs/appservices/2Udpf3w3YKXu3R8b/rest/services/World/Route/NAServer/Route_World" title="http://utility.arcgis.com/usrsvcs/appservices/2Udpf3w3YKXu3R8b/rest/services/World/Route/NAServer/Route_World"&gt;http://utility.arcgis.com/usrsvcs/appservices/XXXXXXXXXXXXXXXX/rest/services/World/Route/NAServer/Route_World&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please can someone help? It is important I use LatLng as I need the routing to be compatible with GoolgeMap and the rest of my application that is all coded to use LatLng. I don't mind converting it if I have to but I need a way to do this programatically in my app.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2017 12:06:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-give-routes-using-latlng-points/m-p/546964#M3734</guid>
      <dc:creator>MalcolmDorn</dc:creator>
      <dc:date>2017-02-10T12:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to give routes using LatLng points?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-give-routes-using-latlng-points/m-p/546965#M3735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/255252"&gt;Malcolm Dorn&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would look to converting the lat/long to what the coordinate system you are using uses. &amp;nbsp;The easiest way to do this is to use the geometry engine and project the lat/long to the coordinates of the routing system you are using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can construct your point using a Point object and then call the project method here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Project(Geometry Engine)&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/geometry/GeometryEngine.html#project(com.esri.arcgisruntime.geometry.Geometry,%20com.esri.arcgisruntime.geometry.SpatialReference)"&gt;https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/geometry/GeometryEngine.html#project(com.esri.arcgisruntime.geometry.Geometry&lt;SPAN&gt;, com.esri.arcgisruntime.geometry.SpatialReference)&lt;/SPAN&gt;&lt;/A&gt;&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, 10 Feb 2017 18:39:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-give-routes-using-latlng-points/m-p/546965#M3735</guid>
      <dc:creator>AlexanderNohe1</dc:creator>
      <dc:date>2017-02-10T18:39:15Z</dc:date>
    </item>
  </channel>
</rss>

