New Freemap client architecture and connection to OSM back end

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

New Freemap client architecture and connection to OSM back end

Nick Whitelegg-2


Spent lunch sketching out some ideas for a new and more interactive client
end for Freemap, with more client/server code separation.  This means that
the existing Freemap server code could potentially easily  be replaced by
the OpenStreetMap server at the back end. It would make use of "AJAX"
(XMLHTTPRequest)

My thoughts are as follows. How does this sound for being pluggable to the
OSM architecture?

Action 1 - User searches for a place (village, town, hill etc).

1. JavaScript on client side constructs HTTP request to search for a place.
The HTTP request could be in XML. e.g.

<OSMrequest action="search">
<place>Guildford</place>
</OSMrequest>

or could just be standard query string.

2. Server recieved request and delivers back it's lat/lon as a response
e.g.

<OSMresponse>
<coords lat="51.5" lon="-0.5"/>
</OSMresponse>

3. Client then uses lat and lon to request appropriate map tile.

Action 2 - User clicks on a feature to get more info about it.

1. JavaScript on client side constructs HTTP request containing lat and lon
of the feature. HTTP request sent to server.
2. Server looks up description of the feature in a database, or on
Wikipedia.
3. Response delivered to client as XML e.g.

<OSMresponse>
<placeinfo>
<place>Guildford</place>
<description>Guildford is the county town of Surrey etc etc etc....
</description>
</placeinfo>
</OSMresponse>

Action 3 - User contributes a walk to the database by dragging their mouse
along the appropriate paths on the map

1. JavaScript on client side constructs HTTP request containing the
coordinates of the user's selected route. HTTP request sent to server.
2. Server adds walking route to database
3. Response is an instruction to the client to reload/refresh the map e.g.

<OSMresponse>
<reload/>
</OSMresponse>

Is this design potentially compatible directly with the plans for the OSM
back end?

Nick


_______________________________________________
Openstreetmap-dev mailing list
[hidden email]
http://bat.vr.ucl.ac.uk/cgi-bin/mailman/listinfo/openstreetmap-dev