#951 closed enhancement/feature request (fixed)
Destination by gps coordinates
Reported by: | al sadakov | Owned by: | KaZeR |
---|---|---|---|
Priority: | minor | Milestone: | version 0.5.1 |
Component: | core | Version: | git master |
Severity: | Keywords: | gps, latlon, input | |
Cc: |
Description (last modified by usul)
In navit svn4838 I can not display the destination on the map by gps coordinates. For example, if I had received from another person's GPS coordinates of his location, I can't display or set destination to them in navit.
As it seem to be nearly finished, I schedule it for the next hotfix.
Attachments (6)
Change History (21)
comment:1 Changed 11 years ago by korrosa
- Summary changed from Destination by gps coordinates in Android to Destination by gps coordinates
comment:2 Changed 11 years ago by martin bruns
Some weeks ago I created a patch to add this requirement to navit.
I do not have svn access so it would be nice if someone else could integrate it to svn.
I also could only test it with Linux navit as I'm unable to install any of my created Android APK (even without that patch).
Additionally to get that patch working the navit.xml needs the following configuration line e.g. in the Actions menu.
<img src='gui_map' onclick='enter_coord()'><text>Coordinates</text></img>
So far I did not create any translations, but I could provide german ones.
Find attached the patch, which is agains rev5160 and two screen shots
Martin
Changed 11 years ago by martin bruns
Changed 11 years ago by martin bruns
Changed 11 years ago by martin bruns
comment:3 Changed 11 years ago by tryagain
Hi!
Your screenshots look very nice!
Did not compile it yet but had a look at the code.
Few ideas follow.
Why do you reimplement functionality similar to coord_parse() rather than just calling that function? If you not satisfied with coord_parse() it may be a good idea to improve it inplace rather than coding something nearly identical in other place.
It would be nice if "Enter Coordinates like sample ones below" have been prepared for translation (surronded with _( and ) ).
Following code looks a bit overcompilcated to me. Why don't replace it with just gui_internal_cmd_position(this, wb, NULL)?
gui_internal_prune_menu(this, NULL); gui_internal_menu(this, _("Enter Coordinates")); gui_internal_menu_render(this); gui_internal_cmd_position(this, wb, NULL); gui_internal_leave(this); gui_internal_check_exit(this);
Probably I know the answer... Commented out code at line 3032 of r5154 gui_internal.c is most probable explanation. You seem to have solved that issue.
We are writing pure C code in most of navit, so C++ style comments are not welcome. Also it's recommended to have doxygen descriptions, see http://wiki.navit-project.org/index.php/Programming_guidelines
Changed 11 years ago by martin bruns
comment:4 Changed 11 years ago by martin bruns
When I remove the 6 code lines with line you suggested, then the input line keep visible after entering the coordnates, so I think it works better with the 6 lines. Although I need to click one more extra to choose from the following menu then. I guess I have open some widget which needs some input, But I have no idea where. I tried to learn the usage from the code, is there some better explaination?
Nevertheless I'm not aware what I should have fixed in the line 3032 was you think?
I'm fine with the coding style and only copied from some other comment ;-).
comment:5 Changed 11 years ago by tryagain
I have compiled the beast.
- It references pointer, already freed by gui_internal_prune_menu(this, NULL) when you enter coordinates and press the Enter key.
- It crashes if you enter only one number and press enter.
comment:6 Changed 11 years ago by sleske
Note: As mentioned in #198, this has also been requested in the Debian bug tracker: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=534767
Once this is implemented, it would be nice to note this in the Debian bug tracker as well.
comment:7 Changed 11 years ago by tryagain
Applied the patch with some fixes by r5175
Please note,
<img src='gui_map' onclick='enter_coord()'><text>Coordinates</text></img>
is not included in my commit, so it's still needed to paste this code into navit.xml. I have not found any good place for that. The Action screen is already overflowed with buttons. We probably need some fresh idea to organize default internal gui.
Hope somebody would test this, report to Debian and close the ticket.
comment:8 Changed 11 years ago by martin bruns
Many hanks for implementing the patch I providing and improving it a lot as it seems, even I have not checked it in detail yet.
It works fine on a Linux binary, but the nightly build Android apk. Crashes on my phone :-(
As I will be offline for the next 4 Weeks I can not do any further tests at this point.
In regard to the navit.xml line. I'm pretty sure we will find a good place to add this. e.g. is the Exit button really needed in the Action menu, could be move to the initial menu.
Martin
comment:9 Changed 11 years ago by tryagain
Looks like strtold is not supported on Android and WinCE. I made the change in r5176. It's building now, so if you have time you may try it in a hour.
comment:10 Changed 11 years ago by martin bruns
Hi,
I was able to test the coordinates entry form on a real Android phone (X10). The function as such works fine for me.
But I think we have to decrease the information text. As you can see in the attached landscape.png the last ine of the virtual keyboard is missing, meaning it is not working at all.
In the portrait.png screenshort you see that the text is shifted to far to the right, but here the feature is working at least.
How to proceed?
Martin
Changed 11 years ago by martin bruns
Changed 11 years ago by martin bruns
comment:11 Changed 11 years ago by tryagain
Should be more usable since r5179
comment:12 Changed 10 years ago by usul
- Description modified (diff)
- Keywords gps latlon input added
- Milestone set to version 0.5.1
- Priority changed from major to minor
So this ticket can be closed? Can anybody test it please?
comment:13 Changed 10 years ago by tryagain
Usul1, we need a little contribution from you :) Can you please suggest a place to put this feature in the default internal gui layout?
comment:14 Changed 9 years ago by sleske
Hm, I'll try to add this to the Internal GUI layout, so this ticket can finally be closed. For now, I'll probably add it to "Actions". It's true that "Actions" is a bit crowded, but we can work on re-structuring the menus in a different ticket.
Also see forum discussion: http://trac.navit-project.org/ticket/1140
comment:15 Changed 9 years ago by sleske
- Resolution set to fixed
- Status changed from new to closed
Coordinate input added to navit_shipped.xml in r5653.
Broadening the scope - essentially, add a feature into Navit where a user can enter the coordinates into a menu, and Navit will use it as a destination, or centre the map over it.