Closed HarelM closed 8 years ago
Totally possible (and not even that complicated, not planning on using the above plugin but rather re-write it for angular)! The legend items however will not be per-tile-type but rather general for all. When changing the layer the legend will change according to currently selected tiles. Styling will be better, don't worry about it, this is just a POC. @zstadler @valleyofdawn please approve the new approach to the legend - this means no ad-hoc legend generation, no pop-up. do we still need to consider adding the legend over the sea of Galilee for non site users?
@zstadler please provide a list of sections and legend items with position and zoom, please make it in Hebrew and English.
@HarelM
IsraelHikingLegend.zip includes an initial and partial definition.
Not sure the marked trails is an important section, removed the jerusalem trail from it anyway otherwise we'll need to add Golan trail, Haifa etc... Words have been uploaded to Zanata, feel free to translate them to hebrew: https://translate.zanata.org/iteration/view/IsraelHiking/Main New Legend can be viewed at the test site, better design is needed, if you have any ideas how to make it look better I'm open to suggestions: http://israelhiking.osm.org.il/Test/ @valleyofdawn, @zstadler: Please see which of the items in each legend are common and which are type specific and I'll see how I can add relevant sections or items by the type of map or something. @zstadler: I'm going to check-in the code now so you'll be able to add more legend items, please see the following file: https://github.com/IsraelHikingMap/Site/blob/master/IsrealHiking.Web/controllers/InfoController.ts
Are you planning this for IHM only or for IL-MTB as well?
Both, see my comment about common things. I kept the current image for reference, imagine that it wouldn't be there.
Initial thoughts:
See how clean it looks on map.hotosm.org
To indicate this capability, the cursor changes into a magnifying glass when the mouse hovers the legand's pictures
As I said, I didn't do any design, the purpose was to show you how it works, and if there are missing stuff. I'll see if I can mimic the design of the original plug-in. This legend will be used for both maps one way or another so keep in mind that it is not IHM specific or if it needs to be then I think there should be map specific section. @valleyofdawn I still want your input on this, I know you spent sometime on the legend and it's important to have you with us. I don't think the goto functionality is needed, I think it's a gimmick, I thought about implementing it but didn't see any value it brings... I want to add this soon so please see what is missing in each legend and add it. I've fixed #235, so I'll add it to the test site.
How about linking legend items to relevant OSM wiki value instead (Israeli wiki for those that are not part of the OSM wiki)?
To be frank, I don't like the idea. I hope it's not just because of the work I've put into the current legend. To watch all the icons this way would take a lot of scrolling, the background is irrelevant and obscuring and the not perfectly straight lines are an eye-sore. It looks like some kind of makeshift improvisation. Sorry
Perfectly good points. However, consider the following adventages
I've asked Harel to look into this style of legend as I could not get myself to create the old style legend for almost 100 graphic features currently used in the hiking map.
This is in spite of the fact that almost half of them are missing in the current legend. Editing an OSM file with JOSM and making everything aligned and equal-spaced is just too much. Let alone the cost of adding just a single new entry like the drinking water icon added last week.
Removing the legend on the Kinneret is IMHO a small price compared to an outdated legend.
Regarding the other concerns, which I share:
I think we cannot have "one legend fit all" as some features are specific to a given map - the marked trails in the hiking map and the MTB scale in the biking map are just two example. Other examples exist in the POI icons. On the other hand, any potential sharing is desired.
I have updated the styling now, so it should look a lot better. Placing a few POIs on the same line will probably create the same issue with the old Legend only in the site, so I'd be happy to avoid it. I think that search the legend should cover the scrolling issue, we should also remember that most people won't look at it more than 10 seconds so I'm not sure scrolling should be considered an issue. I think that most feature are common and that there are some who are map specific. We can add a parameter to an item or a section to tell the legend if to show it or not according to the current map, shouldn't be hard...
I suggest that an item can have a list of maps that will NOT show it. This way when a new map is added, by default all items will be shown in the legend.
Sounds OK to me, although I prefer not to maintain a list but a single value if possible so if it is related to more than one map it's probably related to all the maps, but we should look on a more specific feature and discuss it otherwise it's kinda virtual...
In the case of IL-MTB, people are unlikely to look for the legend for points, as they are mostly self-explanatory. What is essential is the legend for the paths. Their color, style and halo are the essence of the map and cannot be guessed. These features are currently not shown in the legend, while irrelevant ones, such as trail-marking, are.
I know you we do not see eye to eye on this feature, but I think you should tone it down a bit (Unless I'm misreading, your comment is a bit angry). My initial question was what should be in the legend assuming it can be map specific - I still don't have a full answer from you, unless your answer is look at the currently existing legend and use that (which is a perfectly valid answer). I agree with you that scale is important and I know it's currently not in the legend, but I did ask your input and I know you'd want it there, there question is what else, if at all?
I'm preparing a "Bicycle Trails" section that will be not be shown in the hiking map. Similarly, the "Marked Trails" and "Regional Trails" sections should not be shown in the MTB
Not angry at all. Just curt. Whatever is in the current legend, particularly the top right part, must be in.
@zstadler can you check-in the code? or send the relevant part?
@zstadler @valleyofdawn new legend with Hebrew and English support, and filter by map type is now published to test site, please make sure I translated all the words correctly and that all elements are there. Do we want to link to the relevant OSM wiki page? I think it could be a nice addition...?
Something to consider:
I've made some changes in the Hebrew translation. There is some ambiguity related to the term "שביל" which can mean a trail, a route, and a path. I suggest we use the word "שביל" for trails (walking and bicycle relations) and use the word "דרך" elsewhere, if possible. However, I could not find an alternative translation for "path" other than "שביל"...
I think it's a bit too much for a legend, Google layer legend is not working unfortunately and I'm not sure I want to invest time in fixing it... I think this is sufficient for now, if we'll want to improve it more we can do in the future, I want to close this issue...
I think it's a bit too much for a legend, Google layer legend is not working unfortunately and I'm not sure I want to invest time in fixing it...
I don't think we should "invent" a legend for Google Earth or User's layers. It would be nice to have the "Marked Trails" and "Regional Trails" show in the legend if the marked trails overlay is visible.
I think this is sufficient for now, if we'll want to improve it more we can do in the future, I want to close this issue...
The legend's contents is not finished yet.
@HarelM, Please let me know how you would like to annotate turning-off specific POI entries in one map or another. For example, under Amenities, bike shops and first aid show only on the MTB map. On the other hand, under barriers, walls show only on the hiking map.
Google layer is different from regular tile layers because there's no address like other layers has which makes the process of creating a small legend map more complex, so I was thinking not to create the legend in this case which will make things easier for me...
There's no reference to overlays in the info controller now, adding it might get things complicated and I wanted to avoid that too (I sound really lazy, I know... :-/).
I was sure the legend content was complete, sorry.
Currently I left the logic of creating the legend and manipulating the legend to two different part in the code as you might have seen. The first part of the code creates the complete legend that has everything in it and later the second part of the method removes irrelevant things according to rules that are hard coded. I'm not sure this is the cleanest way but I chose to implement it like that so the legend declaration will not have any logic in it. So I think we can continue using this logic to remove irrelevant points, you can either note it by comments so that I'll know when I come to implement it or you can write the logic yourself at the bottom of this huge function.
@zstadler any estimation when you think the legend will be complete? I want to add all the little fixes I made to production.
@HarelM I'm back on it. Hopefully I'll be done in the weekend.
@HarelM Will it be possible to automatically scroll a section to the top of the pane when it is expanded?
For example, Some of the POI's are hidden when you expand their section:
It would be great if the expansion would also scroll the section title as high as possible, without hiding it:
Similarly, if the "Bicycle Trails" "section is expanded when the Singles" section is already expended, it is hardly seen:
Scrolling the section title as high as possible would result in this view
It is possible, but I think you are overthinking it. I prefer to invest my time in real issues like routing or new features like missing formats. In any case I would feel better to add this as another issue so I'll have it in the backkog.
@zstadler I'm not aware of anything that is missing in this implementation, please close this issue once you finish your tests.
This legend is probably the closes solution to what we want: https://github.com/yohanboniface/Leaflet.TileLegend It relays on creating small maps inside the legend control to show the relevant data so that when changing the map the legend get updated automatically. Problem with the above plug-in is that it doesn't support angular and we can't tell it where to be. Also when scrolling it doesn't scroll the legend bug it zooms the map... Issues were opened there, I'll probably be able to implement it before they fix them...