pietervdvn / MapComplete

An easy-to-use webapp to edit OpenStreetMap
https://mapcomplete.org
215 stars 90 forks source link

Open Climbing Map #33

Closed pietervdvn closed 3 years ago

chrneumann commented 3 years ago

Working on this :+1:

pietervdvn commented 3 years ago

Nice.

I already started making one once, but it is very unfinished.. I'm posting it here as it can serve as some inspiration. Note: under the 'share'-tab, you can find a link to the custom generator to edit the theme.

chrneumann commented 3 years ago

Thanks, I'll have a look!

chrneumann commented 3 years ago

Ok, some thoughts:

You have two layers, climbing opportunity and route. I thought about having more layers, for example do differentiate climbing gyms, boulders and cliffs. That would lead to the problem that the tag configuration / questions will have to be repeated for all of them. Which is already the case for your implementation: You support climbing:grade for routes, but not for the climbing opportunities.

How would you do that? Is there a way to define the tags/questions in one place and refer to it in another? Or would you copy the definition? Or just use one big layer? Are there similar use cases in other layers/themes?

Thanks :)

pietervdvn commented 3 years ago

Hey,

Yes, this is possible - these are the 'RoamingRenderings' - tagrenderings added to every layer. With the 'condition' certain layers can be excluded. An example usage can be found here, they can also be added in the custom Generator, under the 'layer' section, then 'Add layers'-section - as can be seen on the bottom of the following screenshot:

image

Another hint: read through the JSON-interface-definition for TagRenderings, Layers and Layouts. That should help. Also: please let me know if something is unclear, AFAIK are you the first to read them so things might still be unclear.

(BTW: I saw your twitter and your CCC-affection - your probably gonna like this theme too (note that this one is still in the testing deployment); if CCC would be happening this year, we would could had a chat IRL...)

pietervdvn commented 3 years ago

PS: my previous theme was very unfinished and was just to get you on track - if you end up not using anything from it, that is fine by me.

chrneumann commented 3 years ago

Thanks! Just tried the RoamingRenderings feature but can't get it to work: https://gist.github.com/chrneumann/7d3270854c76ce931a920b4466e1bba5

The length tag won't show up. I looked at the sources, but there is no reference to "roamingRenderings" of the LayoutConfig class beside of the generator. Is it even in use in the master branch?

(Yeah, let's try to meet at the next CCC, whenever that happens :) )

pietervdvn commented 3 years ago

Is it even in use in the master branch?

Oops, no, seems like I broke that in a refactoring... Will fix tonight.

chrneumann commented 3 years ago

Ok, nice, works :) Still, I'm unsure what to do with general tags like website, opening_hours, ... Is there a way to reuse them (does this have anything to do with SharedLayers?).

pietervdvn commented 3 years ago

Hey Christophe,

General tagRenderings can be found in questions.json - or at least, the website tag and icons for wikipedia and wikimedia.

They can be summoned by placing their name instead of the tagrendering in the tagrenderings-array in the json-file. It is not (yet) possible to add those in the customGeneratorUI.

Feel free to add some general tagrenderings there, I'll gladly join more PR's ;)

I'll also update the docs a little bit on that.

pietervdvn commented 3 years ago

I have pulled the climbing theme back into the main MapComplete instance and made various improvements on the go (such as reviews and opening hour indications).

@chrneumann Feel free to update kletterspots.de with it and to add more if you want to; for now, I'm happy with the result so I'm closing the issue.

chrneumann commented 3 years ago

Thanks! I'll created a PR with the missing translations.

You added questions for the route grading. In the OSM wiki it's recommended to use the UIAA grading system. I would suggest to use this for the question and only display french and other ratings. Or have both? Note sure. In Germany, the FB scale is used in boulder gyms, and the UIAA in rope climbing gyms.

pietervdvn commented 3 years ago

Well, it depends. In Belgium I've only seen the french system used, whereas Germany uses the UIAA-system mostly: https://www.guidedolomiti.com/en/rock-climbing-grades/

Good question on how to proceed; we can do both and e.g. only show one as long as the other isn't filled in or something.

chrneumann commented 3 years ago

Ah, didn't know that the UIAA is not that common. In fact, the Wiki also recommends to "Map the usual one(s) for the climbing spot". Which makes sense. But that would mean having questions for all the systems. Or being able to have a question "Which grading system?" without a tag but which can be used to choose the next questions. Or having a table. Kinda difficult.