Author Topic: Possible to show features of a LoMap at any zoom level via theme?  (Read 1743 times)

Offline gauvins

  • More than Newbie
  • *
  • Posts: 14
  • Thanked: 3 times
    • View Profile
My understanding is that the zoom level at which a map feature is visible is determined by the map data and not by the theme that is applied to it. If I am wrong, please correct me. Otherwise, is it possible to edit the *.map or *.db in order to change the design setting?

This wiki entry suggests that small roads become visible at a zoom level of 15 or more https://wiki.openstreetmap.org/wiki/Zoom_levels. I'd like to be able to see them at a smaller scale. Idem for some POIs such as campsites.
 

Offline michaelbechtold

  • Expert
  • Professor of Locus
  • *****
  • Posts: 1025
  • Thanked: 126 times
    • View Profile
Re: Possible to show features of a LoMap at any zoom level via theme?
« Reply #1 on: October 26, 2021, 14:22:23 »
It is determined by BOTH in fact.
The map typically contains 3 data sets for three zoom level ranges.
If an object is available in such a ZL goup, (only) then the theme decides if it is visible.
If the object is not included at that level in the .map file, then the theme is powerless.

Only the authors can decide and make happen what is in the .map file at which level (group).
 

Offline gauvins

  • More than Newbie
  • *
  • Posts: 14
  • Thanked: 3 times
    • View Profile
Re: Possible to show features of a LoMap at any zoom level via theme?
« Reply #2 on: October 26, 2021, 17:40:02 »
Thanks for your input.

So I gather that it is not possible to change the .map hard=coded ZL values. Too bad.

Would you happen to know if it might be possible to ask for a different set of values for highway=tertiary|unclassified|cycleway ?
 

Offline michaelbechtold

  • Expert
  • Professor of Locus
  • *****
  • Posts: 1025
  • Thanked: 126 times
    • View Profile
Re: Possible to show features of a LoMap at any zoom level via theme?
« Reply #3 on: October 26, 2021, 18:46:47 »
That would be a request to the LoMpas team (Petr et.al.)
But you can try to reduce the minimum in the theme to explore from which ZL these objects of your interest are available today.
 

Offline gauvins

  • More than Newbie
  • *
  • Posts: 14
  • Thanked: 3 times
    • View Profile
Re: Possible to show features of a LoMap at any zoom level via theme?
« Reply #4 on: October 26, 2021, 19:49:34 »
I've edited the theme. Improves things in some cases (ex: campgrounds can be seen at a smaller scale than currently themed); but not for others (route planning in Northern Quebec is an adventure in zooming in-out).

I've sent a request to LoMaps (Assam). Might also try alternative maps - was hoping for a simpler solution :)

Thanks again for your time
 

Offline Viajero Perdido

  • Apprentice of Locus
  • **
  • Posts: 219
  • Thanked: 47 times
  • Country: ca
    • View Profile
  • Device: Samsung Galaxy Tab S7+ (Android 12) and -S2 (Android 7), Blackview BV9900 Pro (Android 9).
Re: Possible to show features of a LoMap at any zoom level via theme?
« Reply #5 on: October 26, 2021, 20:00:29 »
Have you tried OpenAndroMaps with the Elements (not Elevate) theme?

Elements is designed for sparsely-populated areas, and shows elements as soon as their data appears in the file, rather than keeping them selectively hidden until a higher zoom level.

https://www.openandromaps.org/en/legend/elevate-mountain-hike-theme

OAM are very similar to LoMaps, but - ironically - they render better in Locus than Locus' own maps.  That's because OAM and the Locus app both support MapsForge V4, but LoMaps are still stuck at V3.
« Last Edit: October 26, 2021, 20:17:56 by Viajero Perdido »
 
The following users thanked this post: michaelbechtold, Andrew Heard, freischneider

Offline gauvins

  • More than Newbie
  • *
  • Posts: 14
  • Thanked: 3 times
    • View Profile
Re: Possible to show features of a LoMap at any zoom level via theme?
« Reply #6 on: October 26, 2021, 22:34:18 »
Thanks for the pointer.

I will take a look at OAM. But to be honest, I'll probably stick with LoMaps because they work well and (I assume) support the team behind Locus.
 

Offline michaelbechtold

  • Expert
  • Professor of Locus
  • *****
  • Posts: 1025
  • Thanked: 126 times
    • View Profile
Re: Possible to show features of a LoMap at any zoom level via theme?
« Reply #7 on: October 27, 2021, 01:12:32 »
Well, I run a gold subscription, hence support the team, have access in particular to the address/POI DB for offline use, while I employ OAM maps on a daily basis ...
We can achieve all at once :-)
 

Offline freischneider

  • Expert
  • Professor of Locus
  • *****
  • Posts: 1049
  • Thanked: 123 times
    • View Profile
  • Device: Xiaomi Redmi Note 10 Pro, Android 11, Locus Map 4 Gold, Locus-Device-ID: aa54a2bc9
Re: Possible to show features of a LoMap at any zoom level via theme?
« Reply #8 on: October 27, 2021, 06:43:02 »
I also have gold and only use LoMaps because of the offline address data in the background. That means the types are installed but are not displayed. I use the OAM cards for viewing. I think the OAM theme is so good.
 

Offline voldapet

  • Locus team
  • Master of Locus
  • *****
  • Posts: 536
  • Thanked: 22 times
    • View Profile
Re: Possible to show features of a LoMap at any zoom level via theme?
« Reply #9 on: October 27, 2021, 09:49:34 »
@gauvins it's even a little bit more complicated, there is another parameter that defines the minimal zoom-level defined in so called tag-mapping XML file used during map generation. For LoMaps it's https://github.com/asamm/mapsforge-v3-modded/blob/master/various/tag-mapping-xml/tag-mapping-tourist.xml
But the most important is probably the theme itself. The LoMaps theme is available at https://github.com/asamm/mapsforge-v3-modded/tree/master/theme-base/src/main/assets/themes/mapsforgeV3/base

I'd suggest to check alternative community themes available in the Locus Store (Menu > Locus Store > Graphics) or here on the forum  https://forum.locusmap.eu/index.php?board=40.0

There are also other community maps as mentioned OAM as other suggested

@Viajero Perdido we still use mentioned V3 version, we quite modified it for our purposes and should be still quicker in rendering




 

Offline gauvins

  • More than Newbie
  • *
  • Posts: 14
  • Thanked: 3 times
    • View Profile
Re: Possible to show features of a LoMap at any zoom level via theme?
« Reply #10 on: October 27, 2021, 23:09:14 »
@voldapet -- thanks for your pointers.

WRT community themes, there isn't much. The market for e-ink devices is very small. I am working on a grayscale theme, which already works quite well for my purposes.

Two things perhaps --

1. I use Locus in the field (bike touring) to generate routes if the need arises. A key element is the presence/absence of camp sites or such, so I've changed the theme to display camp/caravan POIs at the smallest scale possible. So far so good. However, when I've added picnic sites, which are far more numerous, rendering screeched to a halt.

My understanding is that Locus' engine renders all the tiles that are visible at a given zoom level. If the user figures that something is wrong with rendering and zooms in, in order to reduce the number of features to render, the engine will keep going on the previous task before computing the new set of tiles. Which is odd because unless I am wrong, changing the theme kills the current rendering operation and starts a new one.

2. A related question is what are the best practices for POIs icons. Looks like the source is an .svg that the engine scales to the right size, from which it creates a .png copy that is cached and used as needed. If the icons were always rendered at the same size, irrespective of the zoom-level, would it make sense to pre-render the icons (i.e. link to properly sized icons)?
 

Offline Menion

  • Locus team
  • Professor of Locus
  • *****
  • Posts: 12823
  • Thanked: 952 times
  • Country: cz
    • View Profile
    • https://www.asamm.com
  • Device: Pixel 5, A12
Re: Possible to show features of a LoMap at any zoom level via theme?
« Reply #11 on: November 01, 2021, 15:10:34 »
Hi, your questions are technical (related to the app), so I'll answer instead of Petr.

1. app rendered up to 5 map tiles at once, but in case you zoom, app firstly needs to finish these five tasks. So in the case of really slow rendering, there may be a significant slowdown till the next rendering starts.

2. this is correct, the app renders SVG to PNG in the expected size and caches it. Saving directly in the PNG is possible, but why this? The app will then rescale PNG images based on the device DPI.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 final download
 

Offline gauvins

  • More than Newbie
  • *
  • Posts: 14
  • Thanked: 3 times
    • View Profile
Re: Possible to show features of a LoMap at any zoom level via theme?
« Reply #12 on: November 01, 2021, 16:16:41 »
Thanks for your time (and patience). I am new to this and ask questions left and right.

I am quite pleased with the latest iteration of hcLayers high contrast theme. It essentially does what I want with, perhaps, two caveats:

1. The display of place names is not working well. I've posted in a different sub-forum. The Paris/Argenteuil is just a more visible and funny quirk. I plan to (a) upload place names POIs in order to be able to improve rendering; or (b) download Stamen Toner tiles at small scale as a stop-gap measure.

2. I would really love to be able to display some features at any scale, determined by the theme rather than by the .map. In particular small roads (tertiary, unclassified, tracks, etc.) that are often the only type of "highways" in sparsely populated areas. (I'll try to learn how to generate custom maps, but life is short and perhaps you'll consider selling LoMaps+ :)
 

Offline Viajero Perdido

  • Apprentice of Locus
  • **
  • Posts: 219
  • Thanked: 47 times
  • Country: ca
    • View Profile
  • Device: Samsung Galaxy Tab S7+ (Android 12) and -S2 (Android 7), Blackview BV9900 Pro (Android 9).
Re: Possible to show features of a LoMap at any zoom level via theme?
« Reply #13 on: November 01, 2021, 18:33:51 »
Place names are the big shortcoming of the V3 format.  (What city is this?!?)  That, and the inability to draw curved text labels, which means fewer labels for rivers and trails are drawn, only on straight sections.  V4 fixes both those issues.  (Also with OAM you get mountain ranges, but that's off-topic here.)

PS, if you still prefer LoMaps, there is a version of OAM's Elements theme (mentioned above) for LoMaps, called Elements LE (Locus edition).  That should help with sparsely populated areas, but won't fix the missing text labels.
« Last Edit: November 01, 2021, 18:59:04 by Viajero Perdido »
 

Offline gauvins

  • More than Newbie
  • *
  • Posts: 14
  • Thanked: 3 times
    • View Profile
Re: Possible to show features of a LoMap at any zoom level via theme?
« Reply #14 on: November 01, 2021, 21:04:59 »
I am familiar with Element. IIRC I've used it at some point in time.

Thing is, from what I understand, it cannot render a feature that isn't available (zoom-appear). Unless I am missing something, tertiary is unavailable at a zoom smaller than 12, track at 13, camp_site at 14 (or 12, not obvious) (source here https://github.com/asamm/mapsforge-v3-modded/blob/master/various/tag-mapping-xml/tag-mapping-tourist.xml). And Element will not render in black and white, which is why I got motivated to learn a thing or two about themes and stuff...

My understanding is that it would be possible to extract map data with every feature appearing at zoom 0, and to defer rendering at a given zoom level to the xml (theme) instructions. I don't know how to do this for now, and presume that it may take more than a rainy Sunday to figure out. Yes, there is pleasure in learning new stuff, but life being short, I'd hope to motivate others to do it for me.