[OSM-dev] [OSM-talk] OSM home page map with permlink or

Tom Hughes tom at compton.nu
Sun Oct 21 12:24:58 BST 2007

In message <471B355C.3020403 at frankieandshadow.com>
          David Earl <david at frankieandshadow.com> wrote:

> On 20/10/2007 23:55, Tom Hughes wrote:
> > In message <4719DDD3.6030909 at frankieandshadow.com>
> >           David Earl <david at frankieandshadow.com> wrote:
> > 
> >> As previous conversations have discussed at length, the URL should
> >> reflect changes as you pan/zoom etc. This requires the use of psuedo
> >> named anchors and iframes instead of a query portion of the URL. There's
> >> lots of information out there on the internet on how to achieve this.
> > 
> > It's very non-trivial though because rails doesn't know how to parse
> > the arguments from such URLs, so you're either going to have to wait
> > for me to have time or somebody is going to have to step up to the
> > plate and do the work.
> If I understand what's needed correctly, the URL handling is all done
> client side in Javascript, plus by the browser itself in how it stores
> things in its history list and so on; the JS decomposes the bit after
> the # and makes a request on the server for the state it represents, in
> whatever form is convenient for the server.

You misunderstand entirely I'm afraid - the parsing is largely done
by rails on the server which then generates javascript that assigns
values to javascript variables which are then used in the OL setup
code. So you get things like this in the template on the server:

  var lat = params[:lat]

which is taking a valud from the params array filled in by rails when
it parsed the request URL.


Tom Hughes (tom at compton.nu)

More information about the dev mailing list