OpenStreetMap

More Mapnik fiddling

Posted by Steve Hill on 8 March 2008 in English.

So anyway, I've got Mapnik working and I'm starting to play with setting up contour data (and wow, that needs serious amounts of disk space!)

One thing that's bugging me though, is how to get OpenLayers to use degrees for the permalink? OSM itself seems to do it, but my code (and the OSM cycle map) don't... I tried swiping the "new OpenLayers.Map()" usage from OSM but it's still not happening...

Discussion

Comment from TomH on 8 March 2008 at 15:40

You'll have to create your own permalinks (as openstreetmap.org does) or hack OpenLayers (like informationfreeway,org does) if you want to use the standard OpenLayers PermaLink control.

The next OpenLayers release will support reprojection which will fix this properly.

Comment from Steve Hill on 8 March 2008 at 15:51

Thanks. I will further investigate how OSM does it then.

Comment from IgnoredAmbience on 8 March 2008 at 20:31

If you like bleeding edge software, checkout OpenLayers trunk (its fairly stable), compile it, and then you can just set:
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326")

on the map options.

Log in to leave a comment