Re: Custom rendering minzoom level can't go lower than 14

64 views
Skip to first unread message
Message has been deleted

Majka

unread,
Jul 9, 2019, 4:04:52 AM7/9/19
to Osmand
I am not sure, but about this zoom there is a switch from the local map to the global one (worldwide). It might well be that the data are not there any more - the world map has strongly stripped down data inside.

On Monday, 8 July 2019 15:43:23 UTC+2, Ivan Sams wrote:
I am trying to create a map style that better represents inland waterways than the default or nautical styles do. My first goal is to make waterways features more prominent by setting icons for them and ensuring they are displayed at higher zoom levels, starting with the feature `waterway=lock_gate`.

This tag appears 3 times in the `default.render.xml`:

    <case minzoom="15" tag="waterway" value="lock_gate" textDy="7" textWrapWidth="30" textOrder="212"/>

    <case minzoom="15" tag="waterway" value="lock_gate" icon="waterway_lock_gate_small">
        <apply_if moreDetailed="false" maxzoom="15" icon=""/>
    </case>

    <case minzoom="15" tag="waterway" value="lock_gate" strokeWidth="2" color="#77999999">
        <case minzoom="17" strokeWidth="3"/>
        <apply_if nightMode="true" color="#77444444"/>
    </case>

I added ` icon="seamark_lock_gate"` to the first of these, and I updated all of these minzoom values to 11. The icon correctly displays, but at zoom 14 or less the icon stops displaying.


Harry van der Wolf

unread,
Jul 9, 2019, 1:11:26 PM7/9/19
to osmand
Majka is correct. At zoomlevel 11 you are in the worldmap which simply does not contain this date. It only contains very high-level map data, but no indexes whatsoever.

Another point is that you (only) look at the default.render.xml. That files "treats" the available data in how it is displayed.
However, the renderingtypes.xml determines which "map content" is put in which zoomlevel during map creation. Th at one is not in OsmAnd but compiled into OsmAndMapCreator.

To do what you want to do means that you need to change BOTH the map creation as well as the map rendering. And also in this case zoomlevel 12 is the lowest zoomlevel (and possibly recompile OsmAndMapCreator as I'm not sure whether you can provide a renderingtypes.xml as parameter)

The renderingtypes.xml is used for map creation.
If you look at the renderingtypes.xml on github (https://github.com/osmandapp/OsmAnd-resources/blob/master/obf_creation/rendering_types.xml#L2900) for waterway (<category name="waterway">) ,you can see that also on map creation these items are only added as of zoomlevel 15. They are simpy not there in lower zoomlevels, so the default.render.xml (or any derived xml) cannot display "things" that are not there. 

Harry



Op di 9 jul. 2019 om 10:04 schreef Majka <majk...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "Osmand" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osmand+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osmand/deafde6e-0b4b-4782-81b8-9d66a118dd2a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Harry van der Wolf

unread,
Jul 10, 2019, 11:01:27 AM7/10/19
to osmand
Please find version 3.0 attached. It works for me.


Op wo 10 jul. 2019 om 15:25 schreef Ivan Sams <iv...@whereismytransport.com>:
Thank you Harry and Majka for your replies.

This makes a lot of sense, since the default value for minzoom is 15 for this tag in rendering_types.

I am trying to get OsmAndMapCreator to run but the latest version on the osmand.net/downloads page appears to be missing the main OsmAndMapCreator.jar file.

I downloaded an old version (1.1.0) which has the jar file and runs successfully. I have updated the rendering_types.xml file and downloaded some osm data from geofabrik.de. When I run file > Create obf from osm file and input the file, I get the message:

"java.lang.RuntimeException: Duplicate Name"

I don't know what this message is referring to. Perhaps it is a bug that has been fixed in a later version?

Any ideas where I can get the latest OsmAndMapCreator that is complete with the .jar file?
To unsubscribe from this group and stop receiving emails from it, send an email to osm...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Osmand" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osmand+un...@googlegroups.com.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages