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

Add icons to browser pages #2787

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

Add icons to browser pages #2787

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

Comments

@openstreetmap-trac
Copy link

Reporter: dan[at]karran.net
[Submitted to the original trac issue database at 5.39pm, Wednesday, 10th March 2010]

To try and help provide more at-a-glance information on the browser pages, I've added some CSS rules to add icons to a number of tag value pairs. See http://www.openstreetmap.org/user/dankarran/diary/9770 for more information.

This is an initial patch suggestion, and I'd welcome feedback on things that could be tweaked and improved. In particular, the way we choose which tag keys we choose to pull out, and how that list is maintained over time (the tag value part is all then maintained in the CSS file, so it's easy to add new icons without changing any rails code).

The node icons are based on the mapnik icons, so we'd need to create a copy of them or add them as an svn external or something. The way icons are based on the icons from the key. I think the way icons are a little larger than desired, so perhaps we should look to cut those down when we are displaying them so they don't interrupt the flow too much?

@openstreetmap-trac
Copy link
Author

Author: dan[at]karran.net
[Added to the original trac issue at 11.37pm, Wednesday, 10th March 2010]

Ignore the first patch file, I had a typo in it.

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 12.18am, Thursday, 11th March 2010]

The rails code looks broadly ok from a quick look (only a read through - I haven't tried it live) but the main issue that needs to be resolved before we can do anything with this is producing a consistent set of icons that are all the same size.

@openstreetmap-trac
Copy link
Author

Author: dan[at]karran.net
[Added to the original trac issue at 2.27pm, Thursday, 11th March 2010]

When you say consistent, do you mean in terms of size, or also look and feel? The POI icons are mostly the same size (to within a few pixels), but the way icons can differ quite widely.

If it's mostly the way icons that are the issue, could we go just with the node icons for now and then introduce the way icons later, once I've had a chance to make the necessary alterations to them all?

Regarding the rails code, can you spot why it's only giving the first of the matched tags, and not all of them, as I had originally expected the find_all method to do?

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 2.48pm, Thursday, 11th March 2010]

It was mostly size I was thinking about.

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 3.05pm, Thursday, 11th March 2010]

Oh, and the multiple tag stuff seems to work for me - try http://osm.compton.nu/browse/node/8 and look at "Hrgrbraut (1)".

@openstreetmap-trac
Copy link
Author

Author: dan[at]karran.net
[Added to the original trac issue at 11.01pm, Thursday, 11th March 2010]

I've standardised the size of the way icons so they're all 20px to fit in with the node icons, and the column is now the same size for both nodes and ways at 25px. I think this feels better than it did, though not perfect still. I'd rather avoid tweaking the node icons for now so that we can just reuse the Mapnik ones, but I could do that at some point potentially.

I see the multiple tag thing working for me as well now. I've stripped it out for now though - limiting the number of way keys that we look for - as they're only really useful if we can combine icons somehow.

@openstreetmap-trac
Copy link
Author

Author: dan[at]karran.net
[Added to the original trac issue at 10.04pm, Sunday, 14th March 2010]

I've updated the patch and icons to standardise them a bit further, simplified the rails code a little (partly so we only have one list of tag keys to maintain), made the title attributes work for multiple tags (and at the same time include all tags rather than just the pre-selected keys), and added icons to relation members as well.

Does this look like it's at a good enough point that it can be included on the site?

@openstreetmap-trac
Copy link
Author

Author: dan[at]karran.net
[Added to the original trac issue at 11.00pm, Friday, 14th May 2010]

It's a while since I've done anything with this, but I'm attaching an updated directory of browser icons and the stylesheet. All of the icons are now in the same directory so we don't have to rely on pulling them from different places.

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 1.51pm, Sunday, 16th May 2010]

This has been committed and will be deployed shortly.

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