[OSM-dev] Addressable maps & updated URL?
Tom Hughes
tom at compton.nu
Thu Oct 4 14:21:23 BST 2007
In message <yekwsu3uil8.fsf at dellow.uk.cyberscience.com>
Tom Hughes <tom at compton.nu> wrote:
> In message <4704E373.2000502 at skynet.be>
> Christophe Cattelain <xof at skynet.be> wrote:
>
>> 2/ in the 'moveend' handler,
>> replace
>>
>>> document.cookie = "location=" + lonlat.lon + "," + lonlat.lat + ","
>> + zoom + "," + layers;
>>
>> by (something like)
>>
>>> location.href =
>> url+"#lat="+lonlat.lat.toFixed(6)+"&lon="+lonlat.lon.toFixed(6)+"&zoom="+zoom+"&layers="+layers;
>>
>> (0.000001 degree seems enough, no? (< 0.12 meter (?), 1 pixel @ zoom-12;
>> but, true, 33 pixels @ zoom-17))
>
> This is the only code that should need changing to implement your
> suggestion. I've no idea why you want to faff about without rounding
> the values though - we don't bother anywhere else.
I've just tried this, and it has a fatal flaw - every time I write
to location.href it causes the page to reload!
Tom
--
Tom Hughes (tom at compton.nu)
http://www.compton.nu/
More information about the dev
mailing list