Hi all

I just discovered Mapnik and am very excited about the potential I see
here.  I have run into a problem that I am hoping is easily solved by this
community.

I followed the HelloWorld XML tutorial using the world_borders file
successfully.  I would now like to have my output image rendered to a
Mercator projection(for google).  Unfortunately, when I attempt this I just
get a blank tile.

Here is a summary of my code(some parts removed for readability):

mapfile = 'world_styles.xml'
m = Map(256, 256,"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0
+x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgri...@null +no_defs")
load_map(m, mapfile)
googleProj = Projection("+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0
+lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgri...@null +no_defs")

c0 = googleProj.forward(Coord(leftLong, botLat))
c1 = googleProj.forward(Coord(rightLong, topLat))

 bbox = Envelope(c0.x,c0.y,c1.x,c1.y)
 m.zoom_to_box(bbox)
 map_output = 'H:/inetpub/wwwroot/MapDev/images/image.png'
 render_to_file(m, map_output)


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

Reply via email to