1 (edited by codemogen 2022-09-15 22:05:55)

Topic: [SOLVED] How to handle be out of the route?

Hi Alex,

I create a custom route by using FindDirectionExample script. And I use LocationService to define my location.

now I am able to see both of on the map but I want to alert user if his point go out of the route also I want to notify user when it in the route? Is that possible? How can I do that?

Thank you

Re: [SOLVED] How to handle be out of the route?

Hello.

Find the nearest point on the route to the user's GPS position, and if the distance from the nearest point to GPS position is greater than some threshold (for example, 50 meters), consider that the user has left the route.
See Navigation.cs for an example.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: [SOLVED] How to handle be out of the route?

Thank You Alex, you are the best smile