Topic: Create Map Navigation [Google Map's like] with Direction Icon

Hello I am new to Online maps and thanks to this cool package, i would like to know how i can implement a simple navigation
on the map, just like google map does. Sorry for maybe asking just simple. but i am stuck on that. i do not know how i can start.

I am using Online Maps v3. anyway please help


Thank you

Re: Create Map Navigation [Google Map's like] with Direction Icon

Hello.

Your question is too general.
Please explain in detail what exactly you have a problem, and I will try to explain how to do it.

Kind Regards,
Infinity Code Team.

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

3 (edited by jcthome 2022-10-28 17:02:42)

Re: Create Map Navigation [Google Map's like] with Direction Icon

Hello,

I'm having the same problem! Could you please indicate where I can find any information about the navigation system? Please correct me if I'm wrong but since in the documentation there is nothing about it, and the atlas of examples does not have any information about it as well

Like at least how can I start with the navigation system?

The only information that I could find was the scene already created called navigation, but there is no information about it (not even in the forum, or at least not easy to find), and when I start the scene navigation it does not work as the name suggest. Also, I have no idea how to make the scene work because there are no instructions or documentation about it.

Or Could you please tell me how can I make the scene navigation work? because it is simply a view with one search bar that when you do a search on it the log says all the time Can't find route.

I understand, and I'm very sorry that my question is too general sad , but since it is super challenging to find any information on even how to start, I cannot make a more specific question.

Re: Create Map Navigation [Google Map's like] with Direction Icon

How to make navigation (general steps):
1. Find a route from your location to your destination. It will also contain distance and time information.
2. When the GPS position has changed, find the road segment you are on. Loop through all segments and find the nearest point using OnlineMapsUtils.NearestPointStrict.
3. If the nearest point on the route is far enough from your location (for example, 100 meters), then you have left the route and you need to find a new route.
4. To find the remaining distance, sum the distances of the segments not covered, and add the distance of the current segment multiplied by the percentage of the segment you have completed.
5. The remaining time is calculated in the same way.

To make Navigation scene work you need to enter your Google API Key in the Key Manager, enter Boston in the search field and click Find a route.
If you want to find a route to some other place:
1. Map / Navigation / Use Location Service Position - ON.
2. Map / Location Service / Use GPS Emulator - ON and enter your location.
3. Enter the name of the desired destination and click Find a route.
If the route cannot be found, please make sure that the destination is reachable by car from the emulated location.

Kind Regards,
Infinity Code Team.

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

Re: Create Map Navigation [Google Map's like] with Direction Icon

For the navigation scene, I have tried your steps, and it still does not work. Here is the picture with the settings and me trying to find a route for a destination beside where the emulated location is.

Post's attachments

Attachment icon 2022-10-31_9-01-26.png 547.74 kb, 46 downloads since 2022-10-31 

Re: Create Map Navigation [Google Map's like] with Direction Icon

The attempt with Boston as a destination

Post's attachments

Attachment icon 2022-10-31_9-02-18.png 547 kb, 60 downloads since 2022-10-31 

Re: Create Map Navigation [Google Map's like] with Direction Icon

I just tested this scene in a new project and it works well on my side.

It seems to me that you have some kind of problem with the key or account, such as:
- Billing is not enabled;
- Directions API not enabled;
- Your key is either not valid or has some characters at the beginning or end, such as a space.

Please show your request and response from the service.
You can see it in Console by adding a Log component and enabling Request Events.

Kind Regards,
Infinity Code Team.

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