<?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 Location Display get Map location in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/location-display-get-map-location/m-p/246716#M2335</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to get the map location point of my current location. I do,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt;mapView.locationDisplay.start {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;/SPAN&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;weak&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;self&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt;] (error:&lt;/SPAN&gt;&lt;SPAN class="" style="color: #5c2699;"&gt;&lt;SPAN class="" style="color: #5c2699;"&gt;Error&lt;/SPAN&gt;?&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt;) -&amp;gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #5c2699;"&gt;&lt;SPAN class="" style="color: #5c2699;"&gt;Void&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;in&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;let&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt; error = error {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// show error&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;} else {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// get the map location&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;let currentLocation : AGSPoint = mapView.mapLocation;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f8f8f8; color: #4c4c4c;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f8f8f8; color: #4c4c4c;"&gt;current location point always gives me 0.0 for x and y values, do we have to consider anything here !!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f8f8f8; color: #4c4c4c;"&gt;using swift 4, ArcGIS iOS SDK v100.2.1&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Sep 2019 19:17:21 GMT</pubDate>
    <dc:creator>DevendraKhatri</dc:creator>
    <dc:date>2019-09-25T19:17:21Z</dc:date>
    <item>
      <title>Location Display get Map location</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/location-display-get-map-location/m-p/246716#M2335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to get the map location point of my current location. I do,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt;mapView.locationDisplay.start {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;/SPAN&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;weak&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;self&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt;] (error:&lt;/SPAN&gt;&lt;SPAN class="" style="color: #5c2699;"&gt;&lt;SPAN class="" style="color: #5c2699;"&gt;Error&lt;/SPAN&gt;?&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt;) -&amp;gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #5c2699;"&gt;&lt;SPAN class="" style="color: #5c2699;"&gt;Void&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;in&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;let&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt; error = error {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// show error&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;} else {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// get the map location&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;let currentLocation : AGSPoint = mapView.mapLocation;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f8f8f8; color: #4c4c4c;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f8f8f8; color: #4c4c4c;"&gt;current location point always gives me 0.0 for x and y values, do we have to consider anything here !!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f8f8f8; color: #4c4c4c;"&gt;using swift 4, ArcGIS iOS SDK v100.2.1&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2019 19:17:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/location-display-get-map-location/m-p/246716#M2335</guid>
      <dc:creator>DevendraKhatri</dc:creator>
      <dc:date>2019-09-25T19:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: Location Display get Map location</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/location-display-get-map-location/m-p/246717#M2336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The start callback merely provides info on whether the iOS location API started successfully, or if not, what the reason was.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should also&amp;nbsp;implement the &lt;A href="https://developers.arcgis.com/ios/latest/api-reference/interface_a_g_s_location_display.html#a19dc9c7c16e8c04b183fb81e8aa61867" rel="nofollow noopener noreferrer" target="_blank"&gt;&lt;STRONG&gt;locationChangedHandler&lt;/STRONG&gt;&lt;/A&gt; to get location updates:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;mapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;locationDisplay&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;locationChangedHandler &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; newLocation &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;// This is an AGSLocation.&lt;/SPAN&gt;
    &lt;SPAN class="token function"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"New location is \(newLocation)"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    
    &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;let&lt;/SPAN&gt; mapPoint &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; newLocation&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;position &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="comment token"&gt;// This is an AGSPoint&lt;/SPAN&gt;
        &lt;SPAN class="token function"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"The point represented by the location: \(mapPoint)"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
    
    &lt;SPAN class="comment token"&gt;// An AGSPoint represents a geographic position in a spatial reference.&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;// An AGSLocation will include a point for it's position, but also includes&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;// information about accuracy, heading, velocity, timestamps, etc.&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:16:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/location-display-get-map-location/m-p/246717#M2336</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2021-12-11T12:16:50Z</dc:date>
    </item>
  </channel>
</rss>

