Classic Mapsforge vs VTM

Started by Off-Track1234, August 10, 2026, 02:04:06 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Off-Track1234

Can anyone explain classic Mapsforge vs VTM in context of OM? I already understand (from deepwiki) that VTM (Vector Tile Map) is a cross-platform, OpenGL-based, vector map rendering library, written in Java to allow hardware-accelerated rendering.

1. What are the advantages and disadvantages of each for an OM user?

2. What is the difference between enabling VTM in the Maps settings and the separate entry in the Mapsforge sub-menu settings? Does VTM affect other map types like georeferenced pdf, WMTS and .otrx2? I have from deepwiki that VTM supports multiple vector tile formats: Mapsforge: Native binary format (.map files); MVT: Mapbox Vector Tiles via vtm-mvt module; GeoJSON: Vector tiles via vtm-json module; OSM: OpenScienceMap tile format. Is that off-line in OM? What about other tiled formats and non-tile vector maps? Anything else in OM?

3. VTM brings some new themes (a new heading called 'VTM theme' under Map Tweaks, and many of them work in OM), though it is a bit confusing that the VTM sub-styles are under 'Tweak Mapsforge theme'. Use of VTM also sometimes affects classic Mapsforge themes. Is that expected?

A related suggestion for Orux: Distinguish the names of sub-styles under vtm-OruxGP. At the moment they are all named 'OruxGP OpenAndroMaps', which is confusing (though the icons give a clue for those who look closely enough).


Tronpo

I will try to clarify your questions as far as my knowledge allows; if I'm wrong, I hope Jose (the developer) will correct me :)

Quote from: Off-Track1234 on August 10, 2026, 02:04:06 AMCan anyone explain classic Mapsforge vs VTM in context of OM? I already understand (from deepwiki) that VTM (Vector Tile Map) is a cross-platform, OpenGL-based, vector map rendering library, written in Java to allow hardware-accelerated rendering.

1. What are the advantages and disadvantages of each for an OM user?

OruxMaps does not use the native (classic) Mapsforge rendering engine; it uses its own custom Mapsforge viewer.
So in practice the comparison is not "classic Mapsforge vs VTM", but OruxMaps' own Mapsforge viewer vs VTM-Mapsforge.VTM-Mapsforge allows label (text) rotation, while the built‑in OruxMaps Mapsforge viewer does not.
On the other hand, the OruxMaps viewer supports combined (composite) Mapsforge maps and Mapsforge hillshading, which VTM-Mapsforge does not support.Those are the main functional differences.
Everything else—color tone perception, zoom smoothness, map movement fluidity—mostly depends on user preference and device performance.

Quote from: Off-Track1234 on August 10, 2026, 02:04:06 AM2. What is the difference between enabling VTM in the Maps settings and the separate entry in the Mapsforge sub-menu settings? Does VTM affect other map types like georeferenced pdf, WMTS and .otrx2? I have from deepwiki that VTM supports multiple vector tile formats: Mapsforge: Native binary format (.map files); MVT: Mapbox Vector Tiles via vtm-mvt module; GeoJSON: Vector tiles via vtm-json module; OSM: OpenScienceMap tile format. Is that off-line in OM? What about other tiled formats and non-tile vector maps? Anything else in OM?

The difference between enabling VTM in the general Maps menu or in the Mapsforge menu is simply the scope of where the VTM viewer is applied.If VTM is enabled in the general Maps menu, the VTM viewer will be used for any map type that supports it, such as online and offline vector MBTiles (Mapzen, OpenMapTiles) and, of course, Mapsforge maps.If VTM is enabled only in the Mapsforge menu, then it will be applied exclusively to Mapsforge maps.

Quote from: Off-Track1234 on August 10, 2026, 02:04:06 AM3. VTM brings some new themes (a new heading called 'VTM theme' under Map Tweaks, and many of them work in OM), though it is a bit confusing that the VTM sub-styles are under 'Tweak Mapsforge theme'. Use of VTM also sometimes affects classic Mapsforge themes. Is that expected?

The explanation is quite simple: the VTM viewer has a direct branch connected to Mapsforge
https://github.com/mapsforge/vtm
and it uses its own syntax and rules for its specific themes. These themes are usually simpler, with fewer lines of code, and easier to maintain for their creators. They are designed to work with the official Mapsforge repository maps, although they also work with OAM and FZK maps.The Mapzen and OpenMapTiles styles work with their respective maps or with maps derived from their databases (I haven't been able to obtain any compatible ones to test them).The themes developed specifically for Mapsforge OpenAndroMaps and FZK also work perfectly under the VTM viewer, as you can see. This allows label rotation, as mentioned earlier, and a 3D effect on buildings (although OruxMaps does not implement screen tilt, which in my opinion is one of the strongest features of this viewer — but it would be a huge amount of work for the developer).

Greetings troNpo

Off-Track1234

Thanks Tronpo, that is very helpful.

I think you are too modest (the creator of the vtm-OruxGP theme?). It is very handsome.

These new features that appear undocumented in OM versions are often very useful, but I can assure you that they are neither obvious nor simple to ordinary users. A comprehensive manual would add great value to OM. Perhaps when sales and donations are enough there will be an opportunity to hire a knowledgeable person (like you) to coordinate some volunteers in this effort.

In case you are interested, I noticed that some features (like gates) in the elements theme were rendered by VTM, but not by the classic (OM) Mapsforge engine. Also, I had no luck under (OM?) VTM using dy= to offset some lines of different colour. This may be my deficiency, but it seems to be a known limitation of VTM.

Tronpo

Hello!! I always ask a lot of questions and luckily for me I often find good teachers who give me answers, that's why I know some things about OM. No one is born knowing.
I agree with you: OruxMaps I need a more up-to-date and comprehensive manual.
I always try to be part of the solution and not the problem, that's why I started blogging.
https://tronpoonpo.blogspot.com/?m=1
When my free time allows me, I add the information I get
If vtm-oruxGP was a creation of mine from complete ignorance regarding rules and syntax.... Trial and error
Now with some more knowledge I am developing a new topic, in the next few weeks I will share here in the forum a first draft so that with the help of the community it can be given an optimal way for the global use of OruxMaps users
You're right the attribute "dy" doesn't work on the lines, for vtm-mapsforge
Greetings troNpo

Off-Track1234

Thanks again Tronpo. I look forward to your forecast topic.

Off-Track1234

Quote from: Off-Track1234 on August 11, 2026, 12:58:31 AMsome features (like gates) in the elements theme were rendered by VTM, but not by the classic (OM) Mapsforge engine.

I think this has to do with the way the engines handle overlap (or even close proximity) of icons and labels (sometimes called 'clash' or 'collision'). In OM NG12.0.5, VTM allows icon overlap whereas classic Mapsforge does not (both using the elements render theme). It can be  changed under the Mapsforge engine by editing the render theme to include display="always" for the feature of interest; eg:

<rule e="any" k="barrier" v="gate">
<symbol display="always" priority="70" src="file:ele-res/s_gate.svg" symbol-height="20" />
</rule>

I have noted another difference related to digital zoom in another thread.