diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2012-04-18 19:33:54 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2012-04-18 19:33:54 +0000 |
commit | 511bd3202a0518a793649d5b1324426a9e21bd70 (patch) | |
tree | df5530e8022028be4a867ec88130f819ed78df9a /navit/navit.c | |
parent | e315fc06753738f7dcb2c9e894ba31d0b6741e25 (diff) | |
download | navit-svn-511bd3202a0518a793649d5b1324426a9e21bd70.tar.gz |
Add:Core:Implemented center attribute for navit_get_attr
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5021 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/navit.c')
-rw-r--r-- | navit/navit.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/navit/navit.c b/navit/navit.c index 694b00fe..95ccc14c 100644 --- a/navit/navit.c +++ b/navit/navit.c @@ -164,6 +164,7 @@ struct navit { int border; int imperial; int waypoints_flag; + struct coord_geo center; struct attr **attr_list; }; @@ -2549,6 +2550,7 @@ int navit_get_attr(struct navit *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter) { struct message *msg; + struct coord *c; int len,offset; int ret=1; @@ -2592,6 +2594,11 @@ navit_get_attr(struct navit *this_, enum attr_type type, struct attr *attr, stru case attr_callback_list: attr->u.callback_list=this_->attr_cbl; break; + case attr_center: + c=transform_get_center(this_->trans); + transform_to_geo(transform_get_projection(this_->trans), c, &this_->center); + attr->u.coord_geo=&this_->center; + break; case attr_destination: if (! this_->destination_valid) return 0; |