X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=sym-text.c;h=f2f901e978270a7e364569750020842a0f483891;hb=2dda46b6d1cebc5205f7f98b4db4dcae40c11e55;hp=2666acd9f5d2e6f5984183750ad77b0a1ef2b7c8;hpb=44b0ec8816c3cf1a5858fec0c51e075cedefc3eb;p=leo.git diff --git a/sym-text.c b/sym-text.c index 2666acd..f2f901e 100644 --- a/sym-text.c +++ b/sym-text.c @@ -17,6 +17,8 @@ #include "sym.h" #include "map.h" +#include "labeller.h" + /*** Fonts ***/ struct text_font { @@ -440,7 +442,7 @@ static void sym_text_node(struct osm_object *o, struct style_info *si, osm_val_t return; } - sym_plan(&st->s, sym_zindex(o, si, 5)); + //sym_plan(&st->s, sym_zindex(o, si, 5)); } static void sym_text_center(struct osm_object *o, struct style_info *si, osm_val_t text, double x, double y) @@ -455,7 +457,16 @@ static void sym_text_center(struct osm_object *o, struct style_info *si, osm_val st->x -= st->tw / 2; st->y += st->th - (st->th + st->td) / 2; text_fix_placement(st); - sym_plan(&st->s, sym_zindex(o, si, 4.9)); + if (o->type == OSM_TYPE_WAY && !osm_way_cyclic_p((struct osm_way *) o)) + { + //sym_plan(&st->s, sym_zindex(o, si, 4.9)); + labeller_add_linelabel(&st->s, o, sym_zindex(o, si, 4.9)); + } + else + { + //sym_plan(&st->s, sym_zindex(o, si, 4.9)); + labeller_add_arealabel(&st->s, o, sym_zindex(o, si, 4.9)); + } } static void sym_text_way(struct osm_object *o, struct style_info *si, osm_val_t text)