Working again on styles.

This commit is contained in:
Eric van der Vlist 2023-02-04 21:33:34 +01:00
parent aa158ab515
commit d47a5a7eb1
1 changed files with 6 additions and 1 deletions

View File

@ -468,9 +468,13 @@ const styles = {
if (getZoomInteger() < 13 && !['iwn', 'nwn', 'lwn'].includes(network)) {
return null;
}
const name =
getZoomInteger() < 15
? feature.get('ref')
: feature.get('name') || feature.get('ref');
return {
// isSelected: feature.get('isSelected') ?? false,
name: feature.get('name'),
name: !!name ? name : undefined,
network,
zoom:
getZoomInteger() >= 12
@ -492,6 +496,7 @@ const styles = {
font: 'bold 14px "Open Sans", "Arial Unicode MS", "sans-serif"',
placement: 'line',
overflow: false,
maxAngle: Math.PI / 16,
textBaseline: ['iwn', 'nwn'].includes(network) ? 'top' : 'bottom',
padding: [2, 2, 2, 2],
fill: new Fill({