diff --git a/src/components/gpx/styles.ts b/src/components/gpx/styles.ts index 5b9e3a2..e78b96f 100644 --- a/src/components/gpx/styles.ts +++ b/src/components/gpx/styles.ts @@ -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({