navit-project.org
http://forum.navit-project.org/

Flag/pin/marker for "Vew on map"?
http://forum.navit-project.org/viewtopic.php?f=6&t=452
Page 1 of 2

Author:  xj25vm [ 13 Oct 2013, 15:38 ]
Post subject:  Flag/pin/marker for "Vew on map"?

I'm reposting this here as I didn't realise that the mailing list was closing down:

In Navit, if I go to Bookmarks and a particular bookmark, I get the
option to "View on map". This works as expected and takes me to the
right section of the map - but it doesn't place any flag, marker or pin
on the map to where the actual bookmark was made. Sometime I bookmark
individual buildings or features - and displaying an entire area means I
have to use some other reference source to find out exactly where does
the bookmark point to.

On the mailing list, somebody (sorry, I couldn't find a userid anywhere) mentioned a bookmarks layer. I Googled and can't find how to enable a bookmarks layer in Navit. Any suggestions?

Author:  usul [ 13 Oct 2013, 16:43 ]
Post subject:  Re: Flag/pin/marker for "Vew on map"?

Hi, this was myself at the mailinglist. Good to see you here :)

I checked it and obviously currently there is no default bookmarks layer at SVN. Here is how I added a layer to my map layout:
Code:
<layer name="bookmarks">
   <itemgra item_types="bookmark">
      <icon src="bookmark_32.png"/>
      <circle color="#009640" radius="0" width="0" x="10" y="10" text_size="10"/>
   </itemgra>
</layer>

Author:  xj25vm [ 14 Oct 2013, 13:50 ]
Post subject:  Re: Flag/pin/marker for "Vew on map"?

Hi and thanks for the extra info. For the benefit of others, I found this bug report (http://trac.navit-project.org/ticket/735) and performed the following steps to get it working:

1. Download the bookmark_32.png from the above page and save it in /usr/share/navit/xpm
2. Copy the <map> line suggested at the above page somewhere inside your active <mapset> tag in your navit.xml
3. I had to amend the "$NAVIT_SHAREDIR" to "~/.navit/bookmark.txt" as my bookmarks don't live in the /usr/share/navit folder, which is a system wide folder. Not sure about other setups.
3. Copy the <layer> code inside your "car" <layout> tag. Amend as necessary if you normally use another layout (bike, foot etc.) Make sure you place it at the end of the <layout> section, after all the other layers. Otherwise the bookmarks icons get obscured by roads, waterways etc. which end up above them.

The above worked for me. Don't know if all of the steps are fully correct though - as I had to do some guessing.

I wonder if any of the above info has made it into the wiki yet. A google seach doesn't appear to be turning up anything.

Thanks again for the hints.

Author:  usul [ 14 Oct 2013, 14:26 ]
Post subject:  Re: Flag/pin/marker for "Vew on map"?

Ah ok, I didn't remembered, that it is still a ticket :roll:

Author:  xj25vm [ 14 Oct 2013, 18:08 ]
Post subject:  Re: Flag/pin/marker for "Vew on map"?

I wonder if it would be a good idea to add this as a permanent/integrated functionality in Navit. Something like a setting in navit.xml - for example "show_bookmarks=1" as an attribute of the <general> tag - or in the GUI under settings - or both?

Author:  usul [ 14 Oct 2013, 19:23 ]
Post subject:  Re: Flag/pin/marker for "Vew on map"?

IMHO we should add this as the default behavior. About making it optional, I'm not sure.

Author:  xenos1984 [ 14 Oct 2013, 19:37 ]
Post subject:  Re: Flag/pin/marker for "Vew on map"?

I also think that bookmarks should be shown on the map by default - I see no reason for not showing them, unless somebody has too many of them.

Author:  usul [ 15 Oct 2013, 11:31 ]
Post subject:  Re: Flag/pin/marker for "Vew on map"?

Well in the long run we need IMHO to have an eye on performance, as AFAIK the CSV fileformat uses no tricks for accelerating the lookup and always tests all items.
But hey, first let's start that way and then talk about improvements ;)

Author:  tryagain [ 15 Oct 2013, 17:07 ]
Post subject:  Re: Flag/pin/marker for "Vew on map"?

usul wrote:
Well in the long run we need IMHO to have an eye on performance, as AFAIK the CSV fileformat uses no tricks for accelerating the lookup and always tests all items.


May I ask you how have you concluded that?

Actually, csv file format is represented with quad tree in memory. Implementation has a drawback though: it is storing coordinates as floating point.

Anyway, I don't think there can be anybody having comparable as many bookmarks as there are osm nodes in 2x2 km square area in, say, Paris.

Author:  Mapmapper [ 22 Oct 2013, 11:49 ]
Post subject:  Re: Flag/pin/marker for "Vew on map"?

I added:
Code:
<map type="textfile" data="$NAVIT_SHAREDIR/data/bookmark.txt"/>

But on Android-Smartphone there is no text. (I have still no Picture for bookmarks).

Page 1 of 2 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/