[Openstreetmap-dev] Feasibility of clients of the OpenStreetMap 0.2 API, and Freemap

Nick Whitelegg Nick.Whitelegg at solent.ac.uk
Mon Nov 14 20:00:12 GMT 2005


Hello everyone,

Now that the OSM 0.2 API supports keys and values, I am more or less in a
position to transfer all my Freemap data to the OSM database. My original
intention was to rewrite Freemap so that it requests data from OSM by means
of the API. My only concern is it takes quite a bit of time to retrieve the
XML data if there are significant numbers of nodes and segments in the
current area, so if Freemap was rewritten to request OSM data via the API
then draw the map, it could be quite a slow process. Maybe gzipping would
speed this up acceptably though.

Does everyone think doing it this way would be viable? Or is it better just
writing a "grand unified renderer" on the OSM server itself? The problem
with the latter is that it would be more difficult to allow clients of OSM
data to render maps in their own individual styles. Maybe one solution
would be to pass a "style" as a parameter, which could be "osm" for the
default OSM map, "freemap" for a Freemap style map and so on? Different
scripts could then be called which render the data in different ways.

e.g.

http://www.openstreetmap.org/drawmap?bbox=.....&scale=....&style=osm
http://www.openstreetmap.org/drawmap?bbox=.....&scale=....&style=freemap

This isn't so much in the spirit of distributed web services and so is less
elegant, however I am concerned about the speed of fetching large amounts
of OSM XML data from other web applications.

Is there any way for me to upload some map drawing code (would probably be
in PHP as that is what I have most experience with) to the OSM server? Is
the subversion archive linked to the live web pages?

Or is it better if I pursue my original plan to have Freemap as an OSM
client, fetch OSM data via the API, and draw the maps with the XML thus
returned?

Thanks,
Nick






More information about the dev mailing list