Search code examples
skmaps

routingServiceDidReachDestination called before reaching destination


In the iOS SKMaps SDK, the method routingServiceDidReachDestination is called before the destination is reached. I understand this might be an intended functionality when you're driving, but for walking or cycling getting the "you reached destination" message two blocks before might not be what you need.

Is there any workaround to dispatch this message when you actually did reach the destination?


Solution

  • This goes down to the positioner and positioning logic - the location sensor (GPS/network) will report a certain position that will be matched somewhere on the road.

    If enough such positions indicate that you are "at" your destination (or at a certain point) then the SDK will react accordingly. The "at" factor is influenced by:

    • the location reading
    • the "accuracy" of the location reading (GPS precision)
    • connected with "accuracy" there is a "buffer" around a certain location (area where you might be depending on the accuracy of the location reading
    • your movement speed
    • internal positioner logic (which decides, if the case, on which road you are). With the pedestrian navigation profile the positioner should use a "raw" position, while for the car navigation profile it will use a "matched to road" position

    Based on the above logic it could be that in a high road density area, with low location accuracy and the car navigation profile, you might be "matched" to the wrong road (and thus at your destination). Things might be better with a pedestrian routing profile but still this situation can occur.

    Strive for providing the best location reading possible. If something is bluntly wrong ("two blocks away" is definitely something wrong) you can file a bug report.