Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help - how to use command set_destination in navit.xml #1058

Open
xuniuer opened this issue Sep 11, 2020 · 3 comments
Open

Help - how to use command set_destination in navit.xml #1058

xuniuer opened this issue Sep 11, 2020 · 3 comments

Comments

@xuniuer
Copy link

xuniuer commented Sep 11, 2020

Hi guys!

This is not an issue but a question.

In my application, when clicking screen, I need to use the position as destination. Of course the beginning position is from local GPS. So I think if I can set the position as destination will be OK. But how to use command set_destination in navit.xml file. I check the link: https://wiki.navit-project.org/index.php/OSD, no tips.

Thanks!

@edd-cgfan
Copy link

Hi,

In the main menu I have an icon that sets the destination with an onclick command:
<img src='school' onclick='navit.set_destination("mg:0x1241f0 0x672bf2","WR Parkplatz");back_to_map();redraw_map()'><text>WR_HS</text></img>

mg:0x1241f0 0x672bf2 was taken from bookmark file.

Maybe this helps.

@xuniuer
Copy link
Author

xuniuer commented Sep 14, 2020

@edd-cgfan Yes, it helps. If I have known destination positions, in fact, I have in my application, the solution is fine.

Thanks!

@phice1
Copy link

phice1 commented Jan 13, 2021

I would like to do the same thing, however I would like to not have to leave the screen to enter a menu, I have the waypoint_flag set so that 'plan with waypoints' is enabled, so would simply like the on_click to take the point on the map and have the 'set_destination' create a waypoint at the coordinates of the click.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants