You are not logged in.

Announcement

*** NOTICE: forum.openstreetmap.org is being retired. Please request a category for your community in the new ones as soon as possible using this process, which will allow you to propose your community moderators.
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***

#1 2008-11-20 13:34:52

memespring
Member
Registered: 2008-11-20
Posts: 3

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.

Last edited by memespring (2008-11-20 13:39:02)

Offline

#2 2008-11-20 14:17:09

emj
Member
From: .se (59.3N17.99E) 0735969076
Registered: 2006-06-18
Posts: 949

Re: simplest way to render a custom map

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

Offline

#3 2008-11-20 15:45:11

memespring
Member
Registered: 2008-11-20
Posts: 3

Re: simplest way to render a custom map

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. hmm

Last edited by memespring (2008-11-20 15:56:47)

Offline

#4 2008-11-20 17:25:11

emj
Member
From: .se (59.3N17.99E) 0735969076
Registered: 2006-06-18
Posts: 949

Re: simplest way to render a custom map

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

Offline

#5 2008-11-20 17:31:21

memespring
Member
Registered: 2008-11-20
Posts: 3

Re: simplest way to render a custom map

emj wrote:

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?

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.

Last edited by memespring (2008-11-20 17:40:49)

Offline

#6 2008-11-20 22:16:33

Richard
Member
From: Charlbury, UK
Registered: 2007-04-24
Posts: 427
Website

Re: simplest way to render a custom map

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. smile

Offline

#7 2008-11-21 00:34:31

emj
Member
From: .se (59.3N17.99E) 0735969076
Registered: 2006-06-18
Posts: 949

Re: simplest way to render a custom map

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

Offline

Board footer

Powered by FluxBB