Page MenuHomePhabricator

Simplify the URL parameters cgi-bin/export takes
Closed, DeclinedPublic

Description

Author: avarab

Description:
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.


Version: unspecified
Severity: enhancement

Details

Reference
bz19861

Related Objects

StatusSubtypeAssignedTask
DeclinedNone
ResolvedNone

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:39 PM
bzimport set Reference to bz19861.
bzimport added a subscriber: Unknown Object (MLST).

avarab wrote:

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

MaxSem subscribed.

SlippyMap has been archived, closing.