<?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: LocationDisplay.location and mapLocation returning different points in Kotlin Maps SDK Questions</title>
    <link>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-location-and-maplocation-returning/m-p/1418566#M415</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/476225"&gt;@Shubham_Sharma&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Do you know the reference of the bug please ? I cannot find it.&lt;/P&gt;&lt;P&gt;Thank you,&lt;BR /&gt;Regards,&lt;BR /&gt;Bertrand&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 03 May 2024 07:25:23 GMT</pubDate>
    <dc:creator>BertrandLAURANCIN</dc:creator>
    <dc:date>2024-05-03T07:25:23Z</dc:date>
    <item>
      <title>LocationDisplay.location and mapLocation returning different points</title>
      <link>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-location-and-maplocation-returning/m-p/1410388#M396</link>
      <description>&lt;P&gt;On version 200.4 of the SDK.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Issue&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;According to the API reference, these two attributes should return the same position with the later getting projected to the map view projection. In effect, this does not seem to be the case and the attributes "mapLocation" retains the first position received from the dataSource while "location" correctly gets updated.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2024 16:23:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-location-and-maplocation-returning/m-p/1410388#M396</guid>
      <dc:creator>HVN</dc:creator>
      <dc:date>2024-04-16T16:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: LocationDisplay.location and mapLocation returning different points</title>
      <link>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-location-and-maplocation-returning/m-p/1417291#M409</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/697027"&gt;@HVN&lt;/a&gt;&amp;nbsp;Thanks for bringing this up, it seems like there is a bug with &lt;EM&gt;LocationDisplay.mapLocation&lt;/EM&gt; not updating after the first location update. We have logged this and will provide a fix in the next release.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could instead retrieve the location from the &lt;EM&gt;LocationDisplay.location&lt;/EM&gt; Stateflow, collect the location changes and convert the given location to MapView's projection using &lt;EM&gt;GeometryEngine&lt;/EM&gt;. Essentially, giving you the same value as the "mapLocation".&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="kotlin"&gt;// start the location data source...
lifecycleScope.launch {
    locationDisplay.location.filterNotNull().collect { location -&amp;gt;
        // Get the map location using the same projection as the MapView 
        val mapLocation = GeometryEngine.projectOrNull(
            geometry = location.position,
            spatialReference = mapView.spatialReference.value ?: SpatialReference.webMercator()
        )
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 22:16:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-location-and-maplocation-returning/m-p/1417291#M409</guid>
      <dc:creator>Shubham_Sharma</dc:creator>
      <dc:date>2024-04-30T22:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: LocationDisplay.location and mapLocation returning different points</title>
      <link>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-location-and-maplocation-returning/m-p/1418566#M415</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/476225"&gt;@Shubham_Sharma&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Do you know the reference of the bug please ? I cannot find it.&lt;/P&gt;&lt;P&gt;Thank you,&lt;BR /&gt;Regards,&lt;BR /&gt;Bertrand&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2024 07:25:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-location-and-maplocation-returning/m-p/1418566#M415</guid>
      <dc:creator>BertrandLAURANCIN</dc:creator>
      <dc:date>2024-05-03T07:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: LocationDisplay.location and mapLocation returning different points</title>
      <link>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-location-and-maplocation-returning/m-p/1455638#M424</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;For information :&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;BUG-000167296 : ArcGIS Maps SDK for Kotlin - locationDisplay.location updates as expected when device changes location whereas locationDisplay.mapLocation does not&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 07:28:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-location-and-maplocation-returning/m-p/1455638#M424</guid>
      <dc:creator>BertrandLAURANCIN</dc:creator>
      <dc:date>2024-05-13T07:28:06Z</dc:date>
    </item>
  </channel>
</rss>

