From b7f0dfaeb9366deb76e6381da01e26c03368044c Mon Sep 17 00:00:00 2001 From: jandegr Date: Fri, 4 Mar 2016 17:59:34 +0100 Subject: add destination forward/backward navigation.c contains code to handle destination: backward and forward, but the changes needed in maptool to provide those did not get merged yet. --- navit/maptool/osm.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/navit/maptool/osm.c b/navit/maptool/osm.c index f049f67e1..131d7f0eb 100644 --- a/navit/maptool/osm.c +++ b/navit/maptool/osm.c @@ -106,6 +106,8 @@ enum attr_strings_type { attr_string_ref, attr_string_exit_to, attr_string_street_destination, + attr_string_street_destination_forward, + attr_string_street_destination_backward, attr_string_house_number, attr_string_label, attr_string_postal, @@ -1188,6 +1190,18 @@ osm_add_tag(char *k, char *v) attr_strings_save(attr_string_street_destination, v); level=5; } + if (! strcmp(k,"destination:forward")) + { + if (in_way) + attr_strings_save(attr_string_street_destination_forward, v); + level=5; + } + if (! strcmp(k,"destination:backward")) + { + if (in_way) + attr_strings_save(attr_string_street_destination_backward, v); + level=5; + } if (! strcmp(k,"exit_to")) { attr_strings_save(attr_string_exit_to, v); level=5; @@ -1781,6 +1795,8 @@ osm_end_way(struct maptool_osm *osm) item_bin_add_attr_string(item_bin, attr_street_name_systematic, attr_strings[attr_string_street_name_systematic]); item_bin_add_attr_string(item_bin, attr_street_name_systematic_nat, attr_strings[attr_string_street_name_systematic_nat]); item_bin_add_attr_string(item_bin, attr_street_destination, attr_strings[attr_string_street_destination]); + item_bin_add_attr_string(item_bin, attr_street_destination_forward, attr_strings[attr_string_street_destination_forward]); + item_bin_add_attr_string(item_bin, attr_street_destination_backward, attr_strings[attr_string_street_destination_backward]); item_bin_add_attr_longlong(item_bin, attr_osm_wayid, osmid_attr_value); if (debug_attr_buffer[0]) item_bin_add_attr_string(item_bin, attr_debug, debug_attr_buffer); -- cgit v1.2.1