[OSM-dev] Addressable maps & updated URL?
Tom Hughes
tom at compton.nu
Fri Sep 28 08:48:22 BST 2007
In message <46FC9B1D.1070406 at skynet.be>
Christophe Cattelain <xof at skynet.be> wrote:
> This is my first post; I hope it is not off-topic...
>
> OpenStreetMap is 'addressable', I can use :
>
> http://www.openstreetmap.org/?lat=50.637&lon=5.578&zoom=12&layers=B0F
>
> But, when I move the map, the URL is not updated the way
> http://wikimapia.org does it.
>
> However, it is easy to implement, one just has to change 'location.href'
> on a 'moveend' event...
> Something like
>
> location.href="http://www.openstreetmap.org/#lat=50.72&lon=5.65&zoom=12&layers=B0F";
>
> Notice the '#' in place of the '?' in the URL; otherwise, the page is
> (automaticaly) reloaded!
I was aware that this was a theoretical possibility, but I had never
seen a site that did it and I wasn't sure how well browsers would cope
with constant updating of the URL bar like that or whether people
would like it. I'm certainly not sure if I would like it.
We track the location in a cookie so that if you reload the page, or
go away and come back within a browser session the location is preserved.
> I hope that this is the place to suggest this very usefull (and easy to
> implement) modification...
As somebody has already said, you can get a permalink from the View
tab and we have plans to improve that to make permalinks more obvious.
Tom
--
Tom Hughes (tom at compton.nu)
http://www.compton.nu/
More information about the dev
mailing list