forum for navit navigation tool
It is currently 07 Dec 2021, 22:57
View unanswered posts | View active topics

All times are UTC

Forum rules

Feel free to ask anything here related to the development process - coding, creating new features, fixing bugs and custom changes of Navit.

Note: For reporting bugs, use the bug tracker.

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: android: Show position on the map
PostPosted: 24 Jan 2016, 23:21 

Joined: 24 Jan 2016, 23:11
Posts: 1
i compiled Navit for android, and I want to display a gps position (Lat, Long) on the map by a new menu, like in the history page of internal navit gui, with link :"View on map", I see in the code that to set destination we can do:
float lat = Float.valueOf("48.913");
float lon = Float.valueOf("2.3027");
Bundle b = new Bundle();

b.putFloat("lat", lat);
b.putFloat("lon", lon);

Message msg = Message.obtain(N_NavitGraphics.callback_handler, NavitGraphics.msg_type.CLB_SET_DESTINATION.ordinal());

But i can't see how do to view the same position on the map ("View on map") without set it as destination.

Thank you in advance for your help.

Best Ragrds,

 Post subject: Re: android: Show position on the map
PostPosted: 09 Apr 2016, 07:36 

Joined: 10 Aug 2014, 16:04
Posts: 14
I only did a quick test but you can use the following as a starting point I suppose :

Message msg = Message.obtain(Navit.N_NavitGraphics.callback_handler, NavitGraphics.msg_type.CLB_CALL_CMD.ordinal());
Bundle b = new Bundle();
String command = "set_center(\"" + addressSelected.lon + " " + + "\");";
b.putString("cmd", command);

replace addressSelected.lon and lat with your lon and lat

hint : in a similar manner you can use most of these commands from within the Android code

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 0 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Silver Orange 2.0.6 for IPB Designed by Skins and Hosting
Converted for phpBB3, based on Royal Blue template by BigB © 2007 2008 AEON KINGS