[OSM-dev] GSoc Idea Statics Map API
Andy Deakin
andy.deakin at pcmend.net
Tue Mar 24 22:09:02 GMT 2009
I wrote a php+gd image stitcher in php a year or so ago as a proof of
concept. It was meant for showing the position of a vehicle on the
center of a ~300px square image for a mobile phone screen.
It creates a matrix of osm images (size based on the final image
dimensions) which it either downloads from osm tiles servers or local
cache, and stitches them together. It then crops the image to required
size around a central focal point (suppled lat and long). It adds a push
pin or other image to the center of the image and also adds attribution
to the image.
If anyone is interested, I can stick the source online. It might need a
bit of cleaning up.
I'm not sure downloading 4+ tiles from osm and stitching them together
in php is really the way forward in a production environment, but it is
quick and easy.
Andy
> A much simpler way of implementing something like this, though, is to
> just stitch together the existing tiles, like Patrick mentions. That
> way you don't have to do intensive rendering, you simply load in 4 (or
> more) existing images and stitch them together. You can still then
> overlay markers and do stuff like that, you wouldn't be able to do
> custom styles but that doesn't seem to be part of the requirement.
> This method saves you having to worry about different styles of map in
> the static API, so you wouldn't have to keep config files up to date
> or anything like that, but also allows you to serve any tiles through
> the same method.
>
> FYI, that's how Multimap's API works, don't know about Google but I
> imagine it's similar.
>
>
More information about the dev
mailing list