From fa77f5d8ba6ab9c655d2dd92ecc5f2960504ea49 Mon Sep 17 00:00:00 2001 From: Darafei Praliaskouski Date: Wed, 25 Jul 2012 11:43:40 +0300 Subject: [PATCH] mapnik2 compatibility in hardcoded arrows, #3 --- src/komap.py | 2 +- src/libkomapnik.py | 33 +++++++-------------------------- 2 files changed, 8 insertions(+), 27 deletions(-) diff --git a/src/komap.py b/src/komap.py index 5675394..cca9923 100644 --- a/src/komap.py +++ b/src/komap.py @@ -641,7 +641,7 @@ if options.renderer == "mapnik": #group by %s #"""%(itags,oitags,sql,oitags) elif layer_type == "line" and there_are_dashed_lines and zoom < 10: - itags = ", ".join(itags) + itags = ", ".join(itags) # FIXME: wrong when working with hstore oitags = '"'+ "\", \"".join(oitags) +'"' sqlz = """select %s, ST_LineMerge(ST_Union(way)) as way from (SELECT %s, ST_SnapToGrid(way, %s) as way from planet_osm_line where way && !bbox! and (%s)) as tex group by %s diff --git a/src/libkomapnik.py b/src/libkomapnik.py index a0efc93..76306c4 100644 --- a/src/libkomapnik.py +++ b/src/libkomapnik.py @@ -146,7 +146,7 @@ def xml_textsymbolizer( dy = 0 return """ - [%s] + [%s] """%(face,int(float(size)),color,halo_color,halo_radius,placement,dx,dy,overlap,wrap_width,distance,align,opacity,pos, transform, spacing,text) def xml_shieldsymbolizer(path="", width="", height="", @@ -161,7 +161,7 @@ def xml_shieldsymbolizer(path="", width="", height="", if height: height =' height="%s" '%height return """ - [%s] + [%s] """%(icons_path, \ path, width, height,face,int(float(size)*text_scale),color,halo_color,halo_radius,placement,offset,overlap,wrap_width,distance,align,opacity, transform, unlock_image, spacing,text ) @@ -286,30 +286,11 @@ def xml_hillshade(zoom, x_scale): def xml_hardcoded_arrows(): return """ - - #6c70d5 - 1 - bevel - 0,12,10,152 - - - #6c70d5 - 2 - bevel - 0,12,9,153 - - - #6c70d5 - 3 - bevel - 0,18,2,154 - - - #6c70d5 - 4 - bevel - 0,18,1,155 - """ + + + + +""" def xml_layer(type="postgis", geom="point", interesting_tags = "*", sql = "true", zoom=0 ): layer_id = get_id(1)