-
AuthorPosts
-
August 4, 2023 at 17:13 #54693tartiflette74Participant
Hi,
I would like to use pathText to write the name along the contour of some areas; this is working well, but it also draws the text horizontally and vertically between tiles (in the screenshot, “parc naturel régional du Massif des Bauges” should only follow the green dash line in the middle of the lake).
Is there a way to fix this issue?<rule e="way" k="protect_class" v="pr_1|pr_2|pr_3|pr_4|pr_5|pr_6|pr_7|pr_97|pr_98|pr_99|~"> <line stroke="#3f00A333" stroke-width="0.7" stroke-dasharray="15,5,5,5" stroke-linecap="butt" /> <pathText k="name" dy="2" font-style="bold" font-size="8" fill="#990000FF" stroke="#FFFFFF" stroke-width="1" dy="2.5"/> </rule>
Thanks!
August 4, 2023 at 20:43 #54695JohnPercyParticipantThis is a known problem at certain zoom levels and I don’t know of any way round it.
Voluntary and Velocity themes - https://voluntary.nichesite.org
August 5, 2023 at 09:48 #54696EmuxParticipantIf it is the potential issue with tile grid artifacts inside areas at zoom levels 12-13,
the solution is a different “zoom-interval-conf” in map creation:
https://github.com/mapsforge/mapsforge/blob/master/docs/Getting-Started-Map-Writer.md#known-pitfalls
Cruiser and Mapsforge developer – https://github.com/devemux86/cruiserAugust 5, 2023 at 09:53 #54698tartiflette74ParticipantHi Emux,
The problem is at any zoom level (15 in the screenshot). And it is not about fill, but pathtext which uses the path used to fill, instead of the path used to stroke.
Thanks!August 5, 2023 at 10:16 #54699JohnPercyParticipantHi Tartiflette
I’m pretty certain that the “artifact” that Emux refers to is the cause of the problem you are getting. It is not an issue with your theme.It can be resolved by generating the maps differently but if I recall correctly it would result in a significant increase in size for the OAM maps which is why Christian decided not to follow that option.Voluntary and Velocity themes - https://voluntary.nichesite.org
August 6, 2023 at 15:25 #54705ChristianKKeymasterThere are some maps with different base zoom-level – Like NL
These artefakts are no big issue and did’nt justify the change of base zoom levels in all other maps causing massiv impacts on tag-mapping.
Changing tag-mappings would mean tonns of manhours readjusting zoom-appears and themes to rearchive a stable balance again.August 6, 2023 at 19:43 #54708tartiflette74ParticipantOf course Christian, I am not suggesting to change how the maps are built. I’m trying to understand why stroke does not create artifacts, while pathtext does.
I increased the stroke-width, and removed the dy of pathtext so the text is drawn inside the width of stroke. This is the case in the middle of the tile, however in the tile boundary, the stroke is clipped (or partially clipped when its size is large), while the text is not clipped at all. So there is a difference in how stroke and pathtext are processed.
<rule e="way" k="*" v="*" zoom-min="15"> <line stroke="#3f00A333" stroke-width="2.5" dy="0" /> <pathText k="name" dy="0" font-style="bold" font-size="8" fill="#990000FF" stroke="#FFFFFF" stroke-width="1" dy="0" repeat-gap="10"/> </rule>
I know this issue exists since many years, so sorry if my suggestion is very naive; Emux, would it be possible to have 2 different clipping zones? First clipping, a bit larger than the tile, when computing the geometry of a polygon in a tile of the database, and second clipping when actually drawing the tile (or sub-tile), so drawing the clipped edge will also be clipped.
Thanks!
-
AuthorPosts
- You must be logged in to reply to this topic.