Last modified: 2011-04-14 15:13:31 UTC
It would make the SlippyMap Extension code a lot simpler if the cgi-bin/export script could take that were something like the Google Maps static map API: ?center=40.714728,-73.998672&zoom=14&size=512x512 Instead of the current bbox/scale stuff that needs a lot of complex PHP to calculate. Mapnik probably has functions to make it easy to calculate bbox/scale based on lat/lon/zoom/width/height.
This should be easy to do with a mapnik contrib library: 21:32:59 <@springmeyer> if you just want to support mercator/osm projection then thats pretty easy 21:33:59 <@springmeyer> just do: 21:34:07 <@springmeyer> >>> import mapnik 21:34:18 <@springmeyer> >>> import metaclass_injectors 21:34:25 <@springmeyer> (which are here: http://mapnik-utils.googlecode.com/svn/trunk/nik2img/mapnik_utils/metaclass_injectors.py) 21:34:48 <@springmeyer> and then you'll auto-magically have some functions off the mapnik.Map object to play with 21:36:29 < avar> ah, like set_center_and_zoom 21:36:36 <@springmeyer> yep yep