On Wed, Jan 14, 2009 at 9:51 AM, Nop <[email protected]> wrote:
>
> Hello!
>
>
> The mapnik-rendered map I am working on is still lacking a map key. I am
> a bit at a loss how to set up something for a map key efficnetly,
> considering that it is likely that it will have to be re-rendered as the
> map changes.
>
> Has any of you a recommendation, a trick or an example for this?
>
I've done something like this with PIL (python imaging library). This
assumes a static legend saved as png but you could dynamically create
it as well through pil (drawing text, colored boxes ect). It goes
something like this:
import Image
legend = Image.open("legend.png")
base = Image.open("base_map.png")
base.paste(legend, (0,0), legend)
image_file = "new_with_legend.png"
base.save(image_file)
I don't know if there is an easier way through mapnik but this is how
I decided to do it.
-matt
>
> thanks
> Nop
> _______________________________________________
> Mapnik-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/mapnik-users
>
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users