Hi Anisha, That page simply lists ideas and wishes. No support exists currently inside Mapnik for drawing legends.
While legend generation is highly desirable, it is a non trivial feature to implement and will likely take significant developer time and someone stepping up to fund such work. Ideally legends could be output using Cairo (and potentially PNG with AGG) to allow for both bitmap and vector formats. Dane On Jan 31, 2010, at 11:00 PM, Anisha Kaul wrote: > Hello, > > I want to generate Legends on a map. I refered to this example : > http://trac.mapnik.org/wiki/Legending > Accordingly I wrote the following code in an xml file. > > _________________________________________________________________________ > <Map srs="+proj=latlong +datum=WGS84"> > > <Style name="mountains"> > <Rule> > <PointSymbolizer file="info.png" type="png" width="32" > height="32" allow_overlap="true"/> > </Rule> > </Style> > > > <Legend> > <Title breakline="true" stroke-width="1" stroke="black">Education</ > Title> > <SubTitle>Level of Education Among Population Over Age > 20</SubTitle> > <Item> > <CssParameter name="stroke">white</CssParameter> > <CssParameter name="stroke-width">.5</CssParameter> > <CssParameter name="fill">#93A462</CssParameter> > <ItemText face_name="DejaVu Sans Bold" size="10" > fill="black">Highest</ItemText> > </Item> > </Legend> > </Map> > _________________________________________________________________________ > > > When I loaded the above shown xml file as follows: > load_map (m, "point.xml", True) > > It results in the following compilation error: > > UserWarning: Unknown child node in 'Map'. Expected 'Style' or > 'Layer' but got 'Legend' > > Kindly help !! > > -- > Regards, > Anisha Kaul > > ------------------------------------- > Hi-Tech Gears Limited, Gurgaon, India > > > > > _______________________________________________ > 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

