Closed nlehuby closed 6 years ago
I thought of this, and at the end decided not to go that way, as an icon is usually tied to a UI, therefore depends on the integration (B&W? Single-colored? Is there a marker inside or not? PNG or SVG? Square or not? etc...
So I don't like the idea of a icon: [url] inside the spec
What we did in OSM contributor is insert a set of icons named with the type. If there is no match, it displays a '?' instead.
So I'm thinking this option:
What if we added an icons folder inside this repo, and made it available through gh-pages?
This way, contributors could add their own in the library (with constraints) and we would point OSM contributor icons to this repository.
It would be considered as a "reference icon" only and will not be added to the spec in any "icon" field.
In the validation process, we would make sure that every type name has a matching reference icon in the folder and fail if not.
What do you think?
Reguarding osm contributor, there is only an svg to add inside this folder for it to work:
https://github.com/jawg/osm-contributor/tree/master/icon_generation/src/android/drawable
Yes, I think this is a good idea. But we may consider first to re-use some existing icons repository. For instance:
Mmmh this is great.
Well then I take it back. Let's add a defaultIcon to the spec, with a URI pattern such as osmic://xxx/yyy.svg or others.
All your sources seem awesome, and we would add an async fetch in OSM contributor (this will require some refactoring)
How does it sound?
Seems good :+1:
@LeoFrachet this is the issue about icons
Spec: Presets can now have resources. When posting a preset with resources, one can post images in three different ways:
The resource file MUST be a filename (paths will be escaped) and MUST have a related existing file in the resources/nameofthepreset directory.
Done in #41 and available since Specification schema 1.0
Thank you all ! :1st_place_medal:
This may be a bug in OSM Contributor rather than in H2Geo, but sometimes, the icon defined in the preset does not show up in the app.
For instance, the first one is ok, and the second one is not (from the car preset):
I think we should add some requirements in the specs to help the preset makers: