Anisha, Your map is blank because you have not applied any styles to your map. You added the stylename "roads" to your layer, but you must attached the actual style to the Map as well.
Generally, if rendering OpenStreetMap data for the first time, users pull from the main OSM styles here: http://svn.openstreetmap.org/applications/rendering/mapnik/README However, these styles currently require at least Mapnik 0.6.1. See also: http://trac.mapnik.org/wiki/MapnikTutorials http://trac.mapnik.org/wiki/MapDesign Dane On Jan 5, 2010, at 4:41 AM, Anisha Kaul wrote: > Hello to all, > > Thanks for bearing with me. > I hope this mail will make more sense than my previous ones ! > > Currently, I have _________________________________ > > mapnik-0.6.0 duly installed on OpenSuse 11.2 (64 bit), with > postgresql 8.4.1, > postgis 1.4.1, > osm2pgsql SVN version 0.69-19233. > > I have created the database "gis" successfully and here is what I > have in it: > > List of relations > Schema | Name | Type | Owner > --------+--------------------+-------+-------- > public | geometry_columns | table | anisha > public | planet_osm_line | table | anisha > public | planet_osm_nodes | table | anisha > public | planet_osm_point | table | anisha > public | planet_osm_polygon | table | anisha > public | planet_osm_rels | table | anisha > public | planet_osm_roads | table | anisha > public | planet_osm_ways | table | anisha > public | spatial_ref_sys | table | anisha > (9 rows) > > I have loaded data in the the database with the following command: > ./osm2pgsql -m -d gis ../czechia-071115.osm.bz2 > > I added the following in rundemo.cpp file : > > { > parameters p; > p["type"]="postgis"; > p["host"]="127.0.0.1"; > p["port"]=5432; > p["dbname"]="gis"; > p["user"]="anisha"; > p["password"]=""; > p["table"]="planet_osm_point"; > p["geometry_field"]="way"; > > Layer lyr("Roads"); > lyr.set_datasource(datasource_cache::instance()->create(p)); > lyr.add_style("roads"); > m.addLayer(lyr); > } > > and deleted the default shape file code of rundemo.cpp. (I have > attached rundemo.cpp) > > Problem statement: > ___________________________________________________________________________________________________ > When I compile and run the rundemo.cpp, "demo.jpg" file is blank, > i.e. doesn't show any maps ! > ___________________________________________________________________________________________________ > > > Here's the output of executing rundemo.cpp after modification: > > ./rundemo /usr/local/lib64/mapnik/ > > > running demo ... > looking for 'shape.input' plugin in... /usr/local/lib64/mapnik//input/ > registered datasource : raster > registered datasource : osm > registered datasource : shape > registered datasource : postgis > registered datasource : sqlite > looking for DejaVuSans font in... /usr/local/lib64/mapnik//fonts/ > DejaVuSans.ttf > size = 9 > dbname=gis > geometry_field=way > host=127.0.0.1 > password= > port=5432 > row_limit=10 > table=planet_osm_point > type=postgis > user=anisha > datasource=0x644a30 type=1 > scale=376.547 > start map processing > bbox > = > Envelope > (1405120.04127408 > ,-249015.180277767,1706357.31328276,-23087.22627125698) > start layer processing : Roads > datasource = 0x644a30 > end map processing > Three maps have been rendered using AGG in the current directory: > - demo.jpg > - demo.png > - demo256.png > Have a look! > destroyed singleton > ______________________________________________________________________________________________ > > Please guide !! > -- > Regards, > Anisha Kaul > <rundemo.cpp> > > ------------------------------------- > 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

