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

Tom Hughes tom at compton.nu
Sun Oct 21 17:02:56 BST 2007

In message <562E74E4-E1D2-4CDE-BA36-851D3F1C5B46 at mckerrell.net>
          John McKerrell <john at mckerrell.net> wrote:

> On 21 Oct 2007, at 12:24, Tom Hughes wrote:
> >
> > 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.
> It would be fairly simple to, in the JS, follow that by a bit of code
> that says "but if window.location.hash has a useful value, use that
> instead".

Not really, because some of the page is conditionally generated
by the template based on the value of the parameters.

The rails code just needs to parse the fragment and add any
parameters it finds there to the params array I think.


Tom Hughes (tom at compton.nu)

More information about the dev mailing list