tags:

views:

14

answers:

1

I'm using mapnik to draw a layer with bitmap images. It works good, but it looks like the bottom-right of the image is the x, y of my coordinates. How to align the image so that the center of the image is placed on my coordinates?

point_looks = mapnik.PointSymbolizer(output_filename_abs, 'png', 32, 32) 
layout_rule = mapnik.Rule()
layout_rule.symbols.append(point_looks)
point_style = mapnik.Style()
point_style.rules.append(layout_rule)
A: 

Very stupid of me... the images I used are 16x16 pixels. Thus setting the size to 32x32 will put the lower-right corner as the center.

Jack Ha