plepe / OpenStreetBrowser

An application to ‘browse’ the information in the displayed part of the map. Similar to common Wikis and also the main page of http://www.openstreetmap.org the website shows a narrow menu on the left side, most of the page is used for the display of the map. In contrast to most Wikis the menu is not static, but rather the content of the map can be browsed in categories. For the map a special style has been developed (sorry guys, I neither like the default Mapnik nor Osmarender styles), and special overlays are displayed to support the current browsed categories. When you click on an object (either from the list or directly on the map) informations on this object are displayed.
http://www.openstreetbrowser.org
GNU General Public License v3.0
85 stars 20 forks source link

Default attribute rendering not happening in body for custom categories #169

Open treestryder opened 1 year ago

treestryder commented 1 year ago

I am new to creating categories and could be doing something wrong. I was hoping to benefit from the default body behavior that displays attributes in a nice way. This appears to come from using popupBody.html and/or detailsBody.html as a template. However, this does not happen when working with Custom Categories. Both, after cloning a working category or for any new custom category in a repository.

As an example, see the "Test Shop" category in https://www.openstreetbrowser.org/dev/treestryder./paddlecraft or clone a working category. Then look at an object that would normally display details, like a shop.

plepe commented 1 year ago

Yes, that's right. popup and details body depend on the repository the category comes from. Custom categories are a special kind of repository, and there's no popup/details body there, so they can't be loaded/displayed.

If I want to change this behavior, I have to consider possibilities and implications. I'd rather not give a prediction on this issue (although I already have some ideas) ...

treestryder commented 1 year ago

Good to know. Thank you. I'll look forward to the added functionality when the category is in production. 🙂

For now, could this behavior be mentioned in the How To?

treestryder commented 1 year ago

For testing, could popupBody.html and detailsBody.html be copied to the custom repository?

plepe commented 1 year ago

No, because this is not a normal repository ...

treestryder commented 1 year ago

Now that they are working, I'd like to know if there is a way to suppress the things added by popupBody.html and detailsBody.html?

I like how they look. However, for some of the Paddling Amenities, like a put_in, only the description and wheelchair accessibility are rendered. So, I had created a custom body and now have them rendered twice. I would remove mine, but I was hoping to keep the description at the top, when the defaults get added to the bottom.