I've setup Mapnik to connect to a PostGIS database, and display geometry. I'd like to have a column in my database called opacity
, and use it as the opacity for that row of geometry when Mapnik renders it.
So far, I've only found information on how to display text from the database, and how to use filters to display different styles when database values are within parameters. Nothing about how to use the values directly inside of开发者_运维知识库 a style or layer though - is this possible?
Alex, this is not currently possible for opacity, but you can file a ticket at trac.mapnik.org to request it. Basically, in Mapnik trunk (aka Mapnik2), support has just been added to allow "data-driven symbolizers" for attributes beyond text, but opacity is not yet exposed:
http://mapnik.org/news/2009/dec/08/future_mapnik2/
精彩评论