[OSM-talk] OSM not working for me on Linux

Tom Hughes tom at compton.nu
Sat Nov 24 14:42:05 GMT 2007


On Nov 24, 2007 1:20 AM, Christopher Schmidt <crschmidt at metacarta.com> wrote:

> If I clear my cookies, or open OSM in a browser with no cookies, I see
> this in the code:
>
>     var centre = lonLatToMercator(new OpenLayers.LonLat(-0.1, 51.5));
>     var zoom = ;
>
> Obviously, I wouldn't see this if the IP geocoder returned a location,
> so this  seems to indicate that this line of code:
>
>         <% zoom =  h(params['zoom']) || '5' %>
>
> is not falling back to '5' properly. I *think* this means this bug will
> only happen when the IP Geocoder fails for whatever reason, which would
> result in the non-reproducible nature. I thik it also means if you pass
> in ?zoom=5, it should work as a workaround for users who are having
> problems. (You may have to clear your cookies to get this to work.)

The problem is that h(nil) returns an empty string rather than nil,
and that evaluates to true so we take that instead of the default
value. Hopefully it should be fixed now.

Tom

-- 
Tom Hughes (tom at compton.nu)
http://www.compton.nu/




More information about the talk mailing list