Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Tidy up coordinates on diary entries #1872

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 7 comments
Closed

Tidy up coordinates on diary entries #1872

openstreetmap-trac opened this issue Jul 23, 2021 · 7 comments

Comments

@openstreetmap-trac
Copy link

Reporter: dan[at]karran.net
[Submitted to the original trac issue database at 9.35pm, Tuesday, 26th May 2009]

The coordinates that show on diary entries are a little unwieldy, and I believe unnecessarily so. The attached patch tidies them up a little by limiting the display of them to 4 decimal places.

@openstreetmap-trac
Copy link
Author

Author: smsm1
[Added to the original trac issue at 10.42pm, Tuesday, 26th May 2009]

Personally I think that it would be better to store them to a more reasonable number of decimal places, rather than making the view code messier.

@openstreetmap-trac
Copy link
Author

Author: grand.edgemaster[at]gmail.com
[Added to the original trac issue at 10.24am, Wednesday, 27th May 2009]

I'd lean the other way from shaun and keep the stored numbers at the current precision, and change the patch to pass all digits in the links, rather than cropping them to 4dp. (But keep the displayed digits at 4dp)

@openstreetmap-trac
Copy link
Author

Author: dan[at]karran.net
[Added to the original trac issue at 11.57pm, Wednesday, 27th May 2009]

I'm sort of somewhere in between. When people are using the map to set the coordinates, I doubt we need to give them all those dp, so maybe limit the default. Perhaps limit that through js, but let them enter a more precise figure if they really want to? Then we display a fixed amount, but link them through to what was entered originally. Bit of a compromise?

Updated patch attached.

@openstreetmap-trac
Copy link
Author

Author: grand.edgemaster[at]gmail.com
[Added to the original trac issue at 10.28am, Thursday, 28th May 2009]

I was going to add that it should be possible to reuse the code we use for creating permalinks of a number of decimal places appropriate to the zoom level viewed.
Since diary entries don't indicate the zoom they should be viewed at, it would give an idea at what level of detail the coords refer to.

@openstreetmap-trac
Copy link
Author

Author: grand.edgemaster[at]gmail.com
[Added to the original trac issue at 10.33am, Thursday, 28th May 2009]

The code I was thinking of was

var decimals = Math.pow(10, Math.floor(zoom/3));
lat = Math.round(lat * decimals) / decimals;
lon = Math.round(lon * decimals) / decimals;

Which is currently embedded into the top of the updatelinks function of site.js.

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 12.47pm, Saturday, 27th February 2010]

As of r20184 we now display a reverse geocoded description of the location rather than the raw coordinates.

@openstreetmap-trac
Copy link
Author

Author: dankarran
[Added to the original trac issue at 7.09pm, Saturday, 27th February 2010]

Much better than my original proposal, thanks Tom.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant