simplest way to render a custom map

Can anyone suggest a simple way to render a single image for any given bounding box in php.

What kind of image, do you want to render maps or do you want render images on top of maps? I’m guessing you have no Openstreetmap tools installed, so I’m very interested to hear exactly what you want to do…

  1. create a single image based on a bounding box / zoom using the basic OSM tiles

  2. overlay or merge a custom polyline onto that image

  3. embed the final image in a PDF for printing (I know how to do this step)

I need to do all this at runtime ideally using PHP. :confused:

So basically you want the same image the export tab produce, but overlay stuff? And doing this with out setting up an OSM envirnment? I.e. No database, no ruby scripts, no postgresql?

Btw. I put to gathered a little list of Openstreetmap renderers, and what they can do. It might be enough for you to use the php render but prolly not…

Correct.

I could use curl to post the same data as the export tab, but wasnt sure if that was allowed. I guess I could also use something like GD to add on the overlay.

The export tab isn’t meant as an API - you’ll get blocked if you do that, I suspect.

GD/ImageMagick and tile downloading is probably the simplest way. The more complex way is to get into the whole Osmarender/tiles@home stack, but it’s a bit… complex. :slight_smile:

Tile downloading is very easy to do: http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames