Hi Carl, On Apr 14, 2009, at 12:01 PM, Carl Gleisner wrote:
> > This is the scenario: > > I load an XML-into Viewer. The shapes are latlong WGS84, the XML > specifies > latlong WGS84 and the default should be latlong WGS84. > > How come extents and so on are mercator? > The mercator extents are hardcoded in the viewer only as the default extents until you zoom to the extents of your mapfile data. Reading in the default extents from the XML could be done and I recognize that this would be better behavior, but we'd need a ticket (and a patch) for this. > In the link below there are instructions for rendering mercator maps > using > python. How is this done using C++ in the viewer? > > http://mapnik-utils.googlecode.com/svn/example_code/google_mercator_projection/world_mercator.py > Yes, I wrote that snippet. To render maps in mercator in the viewer your XML srs needs to be in mercator and the srs properties for your input data need to be set correctly (so that mapnik can reproject them to mercator or if already in mercator can leave them untouched): So, you'll need a Map and Layer srs params set similar to this snippet: http://spatialreference.org/ref/sr-org/6/mapnik/ -dane _______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

