-
Notifications
You must be signed in to change notification settings - Fork 22
Description
First of all, thank you very much for the implementation made in the previous issue:
#136
The improvement works very well and the difference in user experience is noticeable. I can already confirm it in OruxMaps iOS.
Following that implementation, I would like to propose an additional enhancement related to how the layers defined in Mapsforge themes are displayed.
Description
In Mapsforge themes, the <stylemenu> block defines the layers that can be enabled or disabled in the interface. Each layer includes <name lang="..."> elements that contain the human‑readable text that should be shown to the user, with support for multiple languages.
Example:
<layer id="elv-h_routes" enabled="true">
<name lang="es" value="[R] Rutas en BTT" />
<name lang="en" value="[R] Mountain bike routes" />
<cat id="h_routes" />
</layer>Currently, the mapsforge_flutter layer selector displays the internal category identifiers (mtb_routes, c_routes, other_refs, etc.) instead of the values defined in the <name> elements of the theme.
Current behavior
- The selector shows the internal IDs of the categories.
- The names defined by the theme author are not used.
- The translations included in the theme file are not applied.
(Screenshot from OruxMaps iOS)
Ideal behavior
- Display in the interface the text defined in
<name lang="...">according to the user’s selected language. - If the language is not available in the theme, use the default language of the
<stylemenu>or the first available<name>. - Show readable and theme‑consistent labels instead of technical identifiers.
(Screenshot from OruxMaps GP Android)
This is how the native Mapsforge libraries handle it.
Technical justification
- The Mapsforge standard defines
<name lang="...">elements as the official source of text to be displayed in the UI. - Themes such as Elevate or Voluntary rely on these names to provide a coherent and localized experience.
- Native Mapsforge libraries do use these values, so implementing this would increase compatibility and fidelity with the original themes.
Thanks in advance.