<?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 within MapExtent in Kotlin Maps SDK Questions</title>
    <link>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-within-mapextent/m-p/1537219#M481</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/81407"&gt;@AdrianaPaese&lt;/a&gt;&amp;nbsp;- correct, "collecting" here is just referring to Kotlin's &lt;A href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-shared-flow/" target="_self"&gt;Flow&lt;/A&gt; terminology where location changed events are "emitted" by a flow and "collected" by a user. It does not mean that the location data is stored by the Maps SDK on the device in any way, it is only used for displaying purposes with the LocationDisplay.&lt;/P&gt;</description>
    <pubDate>Wed, 11 Sep 2024 08:21:37 GMT</pubDate>
    <dc:creator>GuntherHeppner</dc:creator>
    <dc:date>2024-09-11T08:21:37Z</dc:date>
    <item>
      <title>LocationDisplay within MapExtent</title>
      <link>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-within-mapextent/m-p/1536773#M476</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I am trying to&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;setAutoPanMode(LocationDisplayAutoPanMode.Recenter) only when the user is within the ArcGISMap&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;maxExtent.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If I leave&amp;nbsp;setAutoPanMode(LocationDisplayAutoPanMode.Recenter) in the code and the device is outsite the maxExtent, the MapView is centered on a location that does not make sense.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Does anyone have a hint on how may I place a condition on the setAutoPanMode (if this is the best solution)?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you very much in advance&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 12:03:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-within-mapextent/m-p/1536773#M476</guid>
      <dc:creator>AdrianaPaese</dc:creator>
      <dc:date>2024-09-10T12:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: LocationDisplay within MapExtent</title>
      <link>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-within-mapextent/m-p/1536803#M477</link>
      <description>&lt;P&gt;Not sure if this solves your issue, but you can use the GeometryEngine to check if a geometry contains another geometry, see&amp;nbsp;&lt;A href="https://developers.arcgis.com/kotlin/api-reference/arcgis-maps-kotlin/com.arcgismaps.geometry/-geometry-engine/contains.html" target="_blank" rel="noopener"&gt;contains (arcgis.com)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;So you should be able to get the mapExtent, which is an Envelope Geometry, and check if it contains the user, which is a Point Geometry.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 13:07:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-within-mapextent/m-p/1536803#M477</guid>
      <dc:creator>imbachb</dc:creator>
      <dc:date>2024-09-10T13:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: LocationDisplay within MapExtent</title>
      <link>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-within-mapextent/m-p/1536921#M478</link>
      <description>&lt;P&gt;In addition to&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/710993"&gt;@imbachb&lt;/a&gt;&amp;nbsp;proposal, you can keep track of the current location of your device by collecting on the &lt;A href="https://developers.arcgis.com/kotlin/api-reference/arcgis-maps-kotlin/com.arcgismaps.location/-location-data-source/location-changed.html" target="_self"&gt;LocationDataSource.locationChanged&lt;/A&gt; flow.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 16:09:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-within-mapextent/m-p/1536921#M478</guid>
      <dc:creator>GuntherHeppner</dc:creator>
      <dc:date>2024-09-10T16:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: LocationDisplay within MapExtent</title>
      <link>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-within-mapextent/m-p/1537077#M479</link>
      <description>&lt;P&gt;Thank you very much &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/710993"&gt;@imbachb&lt;/a&gt;, but then I have an additional question: how do I retrieve the Point Geometry (XY coordinates)&amp;nbsp; from&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;var &lt;/SPAN&gt;locationDisplay = &lt;SPAN&gt;rememberLocationDisplay&lt;/SPAN&gt;()&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;which is where I believe the location is actually being stored&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thank you very much again!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 10 Sep 2024 20:33:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-within-mapextent/m-p/1537077#M479</guid>
      <dc:creator>AdrianaPaese</dc:creator>
      <dc:date>2024-09-10T20:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: LocationDisplay within MapExtent</title>
      <link>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-within-mapextent/m-p/1537080#M480</link>
      <description>&lt;P&gt;Thank you very much&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/46685"&gt;@GuntherHeppner&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just would like to pan/zoom to the user´s initial location so that the user knows where he is on the MapView. I was not thinking of collecting the user location as it changes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, since you mentioned it and for the purpose of defining Privacy Policies it is my understanding that when we use&amp;nbsp;&lt;SPAN&gt;var&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;locationDisplay =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;rememberLocationDisplay&lt;/SPAN&gt;&lt;SPAN&gt;() or&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;locationDisplay.&lt;SPAN&gt;dataSource&lt;/SPAN&gt;.start()&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;we are not actually collecting / storing the user´s location&lt;/DIV&gt;&lt;DIV&gt;it is just used for displaying a graphic on the screen and when the user leaves the app it is not maintained on the device.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Is my interpretation correct?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thank you very much&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 20:34:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-within-mapextent/m-p/1537080#M480</guid>
      <dc:creator>AdrianaPaese</dc:creator>
      <dc:date>2024-09-10T20:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: LocationDisplay within MapExtent</title>
      <link>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-within-mapextent/m-p/1537219#M481</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/81407"&gt;@AdrianaPaese&lt;/a&gt;&amp;nbsp;- correct, "collecting" here is just referring to Kotlin's &lt;A href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-shared-flow/" target="_self"&gt;Flow&lt;/A&gt; terminology where location changed events are "emitted" by a flow and "collected" by a user. It does not mean that the location data is stored by the Maps SDK on the device in any way, it is only used for displaying purposes with the LocationDisplay.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2024 08:21:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-within-mapextent/m-p/1537219#M481</guid>
      <dc:creator>GuntherHeppner</dc:creator>
      <dc:date>2024-09-11T08:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: LocationDisplay within MapExtent</title>
      <link>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-within-mapextent/m-p/1537222#M482</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/81407"&gt;@AdrianaPaese&lt;/a&gt;&amp;nbsp;- you can retrieve the &lt;A href="https://developers.arcgis.com/kotlin/api-reference/arcgis-maps-kotlin/com.arcgismaps.mapping.view/-location-display/location.html" target="_self"&gt;LocationDisplay.location&lt;/A&gt;, either by reading the value of this StateFlow on demand (via LocationDisplay.location.value) or by collecting emitted values from the flow. See my comments below re "collecting" from a flow.&lt;BR /&gt;&lt;BR /&gt;LocationDisplay.location emits &lt;A href="https://developers.arcgis.com/kotlin/api-reference/arcgis-maps-kotlin/com.arcgismaps.location/-location/index.html" target="_self"&gt;Location&lt;/A&gt; values and &lt;A href="https://developers.arcgis.com/kotlin/api-reference/arcgis-maps-kotlin/com.arcgismaps.location/-location/position.html" target="_self"&gt;Location.position&lt;/A&gt; gives you the actual map point.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2024 08:50:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-within-mapextent/m-p/1537222#M482</guid>
      <dc:creator>GuntherHeppner</dc:creator>
      <dc:date>2024-09-11T08:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: LocationDisplay within MapExtent</title>
      <link>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-within-mapextent/m-p/1537238#M483</link>
      <description>&lt;P&gt;Thank you very much&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2024 10:44:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/kotlin-maps-sdk-questions/locationdisplay-within-mapextent/m-p/1537238#M483</guid>
      <dc:creator>AdrianaPaese</dc:creator>
      <dc:date>2024-09-11T10:44:13Z</dc:date>
    </item>
  </channel>
</rss>

