Add icons to browser pages #2787
Comments
Author: dan[at]karran.net Ignore the first patch file, I had a typo in it. |
Author: TomH 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. |
Author: dan[at]karran.net 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? |
Author: TomH It was mostly size I was thinking about. |
Author: TomH Oh, and the multiple tag stuff seems to work for me - try http://osm.compton.nu/browse/node/8 and look at "Hrgrbraut (1)". |
Author: dan[at]karran.net 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. |
Author: dan[at]karran.net 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? |
Author: dan[at]karran.net 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. |
Author: TomH This has been committed and will be deployed shortly. |
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?
The text was updated successfully, but these errors were encountered: