<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span class="ContentPasted0" style="display: inline !important; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">Hello</span>
</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div class="x_ContentPasted0 ContentPasted0" data-ogsc="" style="margin: 0px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
I am rendering lines that are tagged NATURAL=VALLEY to show the name along a trasparent line on the map, using this style code:</div>
<div class="x_ContentPasted0 ContentPasted0" data-ogsc="" style="margin: 0px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
natural=valley { name '${name}' } [0x12005 resolution 21]</div>
<div data-ogsc="" style="margin: 0px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br class="x_ContentPasted0 ContentPasted0">
</div>
<div class="x_ContentPasted0 ContentPasted0" data-ogsc="" style="margin: 0px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
It works, but gives a problem with multipolygons that use the same tag: I get the name all along the borders of the polygon, while I would want to see it only inside.</div>
<div class="x_ContentPasted0 ContentPasted0" data-ogsc="" style="margin: 0px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Following the style manual (page 11) I am then trying with this code in LINES style file:</div>
<div class="x_ContentPasted0 ContentPasted0" data-ogsc="" style="margin: 0px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
natural=valley & !(is_in(type,multipolygon,on)) { name '${name}' } [0x12005 resolution 21]</div>
<div class="x_ContentPasted0 ContentPasted0" data-ogsc="" style="margin: 0px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
and this in POLYGON style file:</div>
<div class="x_ContentPasted0 ContentPasted0" data-ogsc="" style="margin: 0px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
natural=valley { name '${name}' } [0x10f09 resolution 21]</div>
<div data-ogsc="" style="margin: 0px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br class="x_ContentPasted0 ContentPasted0">
</div>
<div class="x_ContentPasted0 ContentPasted0" data-ogsc="" style="margin: 0px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
It now works for multipolygons: I see the name only inside, and not along the boundaries.</div>
<div class="x_ContentPasted0 ContentPasted0" data-ogsc="" style="margin: 0px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
But doesn't work anymore for lines, meaning that I don't get the name anymore.</div>
<div data-ogsc="" style="margin: 0px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br class="x_ContentPasted0 ContentPasted0">
</div>
<div class="x_ContentPasted0 ContentPasted0" data-ogsc="" style="margin: 0px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
What am I doing wrong ?</div>
<div class="x_ContentPasted0 ContentPasted0" data-ogsc="" style="margin: 0px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
This is one of the areas with multipolygons tagged as valley, if you want to take a look: https://www.openstreetmap.org/#map=14/46.2816/9.6947</div>
<div data-ogsc="" style="margin: 0px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br class="x_ContentPasted0 ContentPasted0">
</div>
<div class="x_ContentPasted0 ContentPasted0" data-ogsc="" style="margin: 0px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Thank you in advance</div>
<span class="ContentPasted0" style="display: inline !important; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">Diego</span><br>
</div>
</body>
</html>