<?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: RouteTracker not working in Swift Maps SDK Questions</title>
    <link>https://community.esri.com/t5/swift-maps-sdk-questions/routetracker-not-working/m-p/1642945#M557</link>
    <description>&lt;P&gt;Thanks for reaching out. I just want to check if you are using the developer license or not when working with&amp;nbsp;&lt;SPAN&gt;RouteTracker? That is, without setting the license key while developing.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Aug 2025 16:13:23 GMT</pubDate>
    <dc:creator>Ting</dc:creator>
    <dc:date>2025-08-18T16:13:23Z</dc:date>
    <item>
      <title>RouteTracker not working</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/routetracker-not-working/m-p/1642764#M554</link>
      <description>&lt;P&gt;Hi there&lt;/P&gt;&lt;P&gt;I'm working with the ArcGIS Maps SDK for Swift (version 200.8) and using an mmpk that includes routing capabilities via a &lt;SPAN&gt;RouteTask&lt;/SPAN&gt;. My goal is to implement navigation with automatic rerouting using &lt;SPAN&gt;RouteTracker&lt;/SPAN&gt;. I can generate and display the initial route on the map, but I'm not receiving any &lt;SPAN&gt;trackingStatus&lt;/SPAN&gt; updates after enabling rerouting and attempting to track user locations.&lt;/P&gt;&lt;P&gt;Here's a simplified version of my code:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;// Route solving (works fine, route displays correctly)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;let&lt;/SPAN&gt;&lt;SPAN&gt; routeParameters = &lt;/SPAN&gt;&lt;SPAN&gt;try&lt;/SPAN&gt; &lt;SPAN&gt;await&lt;/SPAN&gt;&lt;SPAN&gt; routeTask.&lt;/SPAN&gt;&lt;SPAN&gt;makeDefaultParameters&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;routeParameters.returnsDirections = &lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;routeParameters.returnsStops = &lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;routeParameters.directionsStyle = .campus&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;// Set stops and solve...&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;let&lt;/SPAN&gt;&lt;SPAN&gt; routeResult = &lt;/SPAN&gt;&lt;SPAN&gt;try&lt;/SPAN&gt; &lt;SPAN&gt;await&lt;/SPAN&gt;&lt;SPAN&gt; routeTask.&lt;/SPAN&gt;&lt;SPAN&gt;solve&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;using&lt;/SPAN&gt;&lt;SPAN&gt;: routeParameters)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;// Rerouting setup&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;let&lt;/SPAN&gt;&lt;SPAN&gt; reroutingParameters = &lt;/SPAN&gt;&lt;SPAN&gt;ReroutingParameters&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;routeTask&lt;/SPAN&gt;&lt;SPAN&gt;: routeTask,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;routeParameters&lt;/SPAN&gt;&lt;SPAN&gt;: routeParameters&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;let&lt;/SPAN&gt;&lt;SPAN&gt; routeTracker = &lt;/SPAN&gt;&lt;SPAN&gt;RouteTracker&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;routeResult&lt;/SPAN&gt;&lt;SPAN&gt;: routeResult,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;routeIndex&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;skipsCoincidentStops&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;try&lt;/SPAN&gt; &lt;SPAN&gt;await&lt;/SPAN&gt;&lt;SPAN&gt; routeTracker.&lt;/SPAN&gt;&lt;SPAN&gt;enableRerouting&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;using&lt;/SPAN&gt;&lt;SPAN&gt;: reroutingParameters)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;// Observation and tracking in a Task&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Task {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;for&lt;/SPAN&gt; &lt;SPAN&gt;await&lt;/SPAN&gt;&lt;SPAN&gt; trackingStatus &lt;/SPAN&gt;&lt;SPAN&gt;in&lt;/SPAN&gt;&lt;SPAN&gt; routeTracker.$trackingStatus {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;guard&lt;/SPAN&gt; &lt;SPAN&gt;let&lt;/SPAN&gt;&lt;SPAN&gt; trackingStatus &lt;/SPAN&gt;&lt;SPAN&gt;else&lt;/SPAN&gt;&lt;SPAN&gt; { &lt;/SPAN&gt;&lt;SPAN&gt;continue&lt;/SPAN&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;await&lt;/SPAN&gt; &lt;SPAN&gt;self&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;updateProgress&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;using&lt;/SPAN&gt;&lt;SPAN&gt;: trackingStatus) &lt;/SPAN&gt;&lt;SPAN&gt;// This never triggers&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;for&lt;/SPAN&gt; &lt;SPAN&gt;await&lt;/SPAN&gt;&lt;SPAN&gt; location &lt;/SPAN&gt;&lt;SPAN&gt;in&lt;/SPAN&gt;&lt;SPAN&gt; locationModel.locations {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;try&lt;/SPAN&gt; &lt;SPAN&gt;await&lt;/SPAN&gt;&lt;SPAN&gt; routeTracker?.&lt;/SPAN&gt;&lt;SPAN&gt;track&lt;/SPAN&gt;&lt;SPAN&gt;(location)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Observations:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;No errors are thrown during route solving, tracker creation, or rerouting enablement.&lt;/LI&gt;&lt;LI&gt;The initial route geometry from &lt;SPAN&gt;routeResult.routes&lt;/SPAN&gt; is correct and renders properly on the map.&lt;/LI&gt;&lt;LI&gt;Locations passed to &lt;SPAN&gt;track(location)&lt;/SPAN&gt; are of the following form, e.g.:&lt;BR /&gt;&lt;SPAN&gt;Location: heading 81.42815691730715, speed 0.0, position (x: 8.148408059669505, y: 47.37600416066834, spatialReference: WKID 4326)&lt;/SPAN&gt;.&lt;/LI&gt;&lt;LI&gt;I've confirmed &lt;SPAN&gt;routeTracker.reroutingIsEnabled&lt;/SPAN&gt; is &lt;SPAN&gt;true&lt;/SPAN&gt; after enabling.&lt;/LI&gt;&lt;LI&gt;No updates are received in the &lt;SPAN&gt;for await&lt;/SPAN&gt; loop on &lt;SPAN&gt;$trackingStatus, and w&lt;/SPAN&gt;hen checking &lt;SPAN&gt;routeTracker.trackingStatus&lt;/SPAN&gt; periodically (via a timer), it also remains &lt;SPAN&gt;nil&lt;/SPAN&gt;.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any idea why I am not getting any &lt;SPAN&gt;trackingStatus&lt;/SPAN&gt; updates?&lt;/P&gt;&lt;P&gt;Any insights would be greatly appreciated!&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Aug 2025 06:14:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/routetracker-not-working/m-p/1642764#M554</guid>
      <dc:creator>bastian</dc:creator>
      <dc:date>2025-08-18T06:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: RouteTracker not working</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/routetracker-not-working/m-p/1642766#M555</link>
      <description>&lt;P&gt;Sorry for the code formatting, unfortunately I could not format it without getting an html error. Also, I cannot edit my own post since I only just created this account.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="swift"&gt;// Route solving (works fine, route displays correctly)
let routeParameters = try await routeTask.makeDefaultParameters()
routeParameters.returnsDirections = true
routeParameters.returnsStops = true
routeParameters.directionsStyle = .campus
// Set stops and solve...
let routeResult = try await routeTask.solve(using: routeParameters)

// Rerouting setup
let reroutingParameters = ReroutingParameters(
    routeTask: routeTask,
    routeParameters: routeParameters
)
let routeTracker = RouteTracker(
    routeResult: routeResult,
    routeIndex: 0,
    skipsCoincidentStops: true
)!

try await routeTracker.enableRerouting(using: reroutingParameters)

// Observation and tracking in a Task
Task {
    for await trackingStatus in routeTracker.$trackingStatus {
        guard let trackingStatus else { continue }
        await self.updateProgress(using: trackingStatus)  // This never triggers
    }
    
    for await location in locationModel.locations {
        try await routeTracker?.track(location)
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Aug 2025 06:18:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/routetracker-not-working/m-p/1642766#M555</guid>
      <dc:creator>bastian</dc:creator>
      <dc:date>2025-08-18T06:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: RouteTracker not working</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/routetracker-not-working/m-p/1642945#M557</link>
      <description>&lt;P&gt;Thanks for reaching out. I just want to check if you are using the developer license or not when working with&amp;nbsp;&lt;SPAN&gt;RouteTracker? That is, without setting the license key while developing.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Aug 2025 16:13:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/routetracker-not-working/m-p/1642945#M557</guid>
      <dc:creator>Ting</dc:creator>
      <dc:date>2025-08-18T16:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: RouteTracker not working</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/routetracker-not-working/m-p/1642952#M558</link>
      <description>&lt;P&gt;Hi Ting, thanks for your reply. We are not using the developer license, i.e. we are setting the license key during startup.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Aug 2025 16:50:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/routetracker-not-working/m-p/1642952#M558</guid>
      <dc:creator>bastian</dc:creator>
      <dc:date>2025-08-18T16:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: RouteTracker not working</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/routetracker-not-working/m-p/1642955#M559</link>
      <description>&lt;P&gt;Can you try not to set the license key (leave it in the developer mode) to test whether your code works or not? Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Aug 2025 16:55:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/routetracker-not-working/m-p/1642955#M559</guid>
      <dc:creator>Ting</dc:creator>
      <dc:date>2025-08-18T16:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: RouteTracker not working</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/routetracker-not-working/m-p/1643180#M562</link>
      <description>&lt;P&gt;Hi Ting,&lt;/P&gt;&lt;P&gt;Thank you for your help—this indeed resolved the issue. I have two follow-up questions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;How can we enable rerouting when setting the license key?&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;We've noticed that rerouting takes significant time to trigger. Users must deviate considerably from the current indoor route before the SDK recomputes a new path. This threshold feels too high for practical use, as users often need to traverse nearly the entire building for rerouting to occur. Is there a way to configure or adjust this rerouting threshold to make it more responsive?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance for your help!&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Tue, 19 Aug 2025 08:39:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/routetracker-not-working/m-p/1643180#M562</guid>
      <dc:creator>bastian</dc:creator>
      <dc:date>2025-08-19T08:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: RouteTracker not working</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/routetracker-not-working/m-p/1643322#M563</link>
      <description>&lt;OL&gt;&lt;LI&gt;How can we enable rerouting when setting the license key?&amp;nbsp;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;You'll need a Basic or higher license key to use the RouteTracker. See&amp;nbsp;&lt;A href="https://developers.arcgis.com/swift/license-and-deployment/license-levels-and-capabilities/" target="_blank" rel="noopener"&gt;License levels and capabilities&lt;/A&gt; for more details.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;T&lt;SPAN&gt;his threshold feels too high for practical use, as users often need to traverse nearly the entire building for rerouting to occur.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I think the threshold is determined by both the edge geometries in the network (i.e. how dense are the roads), and a baked-in magic number for how far off the course to start reroute.&lt;/P&gt;&lt;P&gt;By the way, are you doing indoors navigation with route tracker rerouting?&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1328"&gt;@FrankKish&lt;/a&gt;&amp;nbsp;I'll defer this to our network domain expert Frank as he knows more about how the rerouting internals work.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Aug 2025 16:04:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/routetracker-not-working/m-p/1643322#M563</guid>
      <dc:creator>Ting</dc:creator>
      <dc:date>2025-08-19T16:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: RouteTracker not working</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/routetracker-not-working/m-p/1643584#M565</link>
      <description>&lt;P&gt;Hi Ting,&lt;/P&gt;&lt;P&gt;Thank you for your support. We are indeed primarily using the map, navigation, and rerouting features indoors. Could the magic number be based on outdoor or vehicle navigation, which likely requires a higher threshold?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Aug 2025 06:31:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/routetracker-not-working/m-p/1643584#M565</guid>
      <dc:creator>bastian</dc:creator>
      <dc:date>2025-08-20T06:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: RouteTracker not working</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/routetracker-not-working/m-p/1643817#M566</link>
      <description>&lt;P&gt;Yes. Our current rerouting implementation is more geared towards a moving vehicle, which wouldn't work very well with pedestrians indoors. There isn't a public interface to fine-tune this behavior currently, unfortunately.&lt;/P&gt;&lt;P&gt;Would you mind logging a suggestion on the &lt;A href="https://community.esri.com/t5/arcgis-maps-sdks-native-ideas/idb-p/arcgis-runtime-sdks-ideas" target="_self"&gt;Ideas&lt;/A&gt; board? Thus, we can triage this improvement in our future releases.&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1328"&gt;@FrankKish&lt;/a&gt;&amp;nbsp;will be able to provide more details.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Aug 2025 16:42:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/routetracker-not-working/m-p/1643817#M566</guid>
      <dc:creator>Ting</dc:creator>
      <dc:date>2025-08-20T16:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: RouteTracker not working</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/routetracker-not-working/m-p/1643846#M567</link>
      <description>&lt;P&gt;Ting's remark above is correct — the existing API is mainly intended for vehicles. It uses a threshold of about 12 meters, plus other factors such as bearing, to decide if a vehicle has deviated from the route.&lt;/P&gt;&lt;P&gt;The distance value used needs to strike a balance between promptly identifying when navigation is off-route vs. false positives, which is dependent on the accuracy of the incoming location data.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Aug 2025 17:55:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/routetracker-not-working/m-p/1643846#M567</guid>
      <dc:creator>FrankK</dc:creator>
      <dc:date>2025-08-20T17:55:23Z</dc:date>
    </item>
  </channel>
</rss>

