[OSM-dev] Tile centered on POI... howto?
Frederik Ramm
frederik at remote.org
Tue Apr 17 09:47:05 BST 2012
Hi,
On 04/17/12 10:15, Morten Kjeldgaard wrote:
> Is there a smart way to do this, other than downloading the center tile
> plus the 8 surrounding tiles, assembling the 9 tiles into a 768 x 768
> image, and finally cropping it down to a 256 x 256 tile centered on the
> POI?
You could of course have a local osm2pgsql database, and then use the
nik2img.py utility to request a rendering of 256x256 pixel around a
given centre point. But if you don't want that then you will have to use
9 existing tiles. You can either "crop" them with Javascript (i.e. just
display them in a displaced fashion inside a 256x256 viewport) or you
can crop them on the server like the various "static map"
implementations do but in both cases the 9 tiles will have to be
retrieved by someone.
Bye
Frederik
--
Frederik Ramm ## eMail frederik at remote.org ## N49°00'09" E008°23'33"
More information about the dev
mailing list