On Sat, 2009-04-18 at 09:39 +0200, Torsten Mohr wrote:
> Hello,
> 
> thanks a lot for these explanations.  That link to the XML descriptions
> was very useful.
> 
> 1.
> Another question, is it possible to create PNGs with alpha support?
> I'd like the background to be "invisible", so i can overlay a map onto
> another image.  Or do i need to replace the background value in the
> map with an "invisible" pixel with an external tool?

Set the map bgcolor to "transparent". Note that does not work when
rendering to "png256" output, normal png output is OK.


> 2.
> Also, i try to get the scale() and scale_denominator() of the map.
> I wonder why it is NEGATIVE (below zero):
> 
>     print "scale", m.scale()
>     print "denom", m.scale_denominator()
> 
> --->
> scale -0.000333333333333
> denom -1.19047619048
> 
> I use a slightly modified version of OSMs generate_image.py with
> these map values:
> 
>     ll = (4.5, 46, 16, 56) # Deutschland
> #    ll = (-180.0, -90.0, 180.0, 90.0) # Welt
>     z = 10
>     imgx = 300 * z
>     imgy = 400 * z
> 
>     m = Map(imgx, imgy)

Try placing the two print lines after the m.zoom_to_box() line.
Otherwise I think you are getting uninitialised data being returned.
I see:

scale 256.034828825
denom 914410.102945

        Jon


_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to