summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--navit/attr_def.h1
-rw-r--r--navit/track.c11
2 files changed, 12 insertions, 0 deletions
diff --git a/navit/attr_def.h b/navit/attr_def.h
index 1530888a5..9e7bbdd2b 100644
--- a/navit/attr_def.h
+++ b/navit/attr_def.h
@@ -171,6 +171,7 @@ ATTR(tec_direction)
ATTR(imperial)
ATTR(update_period)
ATTR(tunnel_extrapolation)
+ATTR(street_count)
ATTR2(0x00027500,type_rel_abs_begin)
/* These attributes are int that can either hold relative *
* or absolute values. A relative value is indicated by *
diff --git a/navit/track.c b/navit/track.c
index 0c3f84a3d..f2df82842 100644
--- a/navit/track.c
+++ b/navit/track.c
@@ -329,12 +329,15 @@ tracking_get_attr(struct tracking *_this, enum attr_type type, struct attr *attr
{
struct item *item;
struct map_rect *mr;
+ struct tracking_line *tl;
+
int result=0;
dbg(1,"enter %s\n",attr_to_name(type));
if (_this->attr) {
attr_free(_this->attr);
_this->attr=NULL;
}
+ attr->type=type;
switch (type) {
case attr_position_valid:
attr->u.num=_this->valid;
@@ -363,6 +366,14 @@ tracking_get_attr(struct tracking *_this, enum attr_type type, struct attr *attr
return 0;
attr->u.item=&_this->curr_line->street->item;
return 1;
+ case attr_street_count:
+ attr->u.num=0;
+ tl=_this->lines;
+ while (tl) {
+ attr->u.num++;
+ tl=tl->next;
+ }
+ return 1;
default:
if (! _this->curr_line || ! _this->curr_line->street)
return 0;