Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Captions on ways (polylines) #11

Open
sikmir opened this issue Mar 24, 2022 · 3 comments
Open

Captions on ways (polylines) #11

sikmir opened this issue Mar 24, 2022 · 3 comments

Comments

@sikmir
Copy link

sikmir commented Mar 24, 2022

According to doc captions on ways (polylines) are not supported yet:

smrender/doc/smrender.html

Lines 1015 to 1018 in 9559551

<b>Captions on ways&nbsp;&nbsp;</b> are handled a little bit different from captions
on nodes. Actually, captions on ways (polylines) are not supported yet but
captions on areas (closed polygons) are supported very well, although it is still
in development.

Is there any workaround to get captions on ways? Or is it planned to support?

@rahra
Copy link
Owner

rahra commented Mar 28, 2022

Yes, there is a workaround. What exactly would you like to do?

@sikmir
Copy link
Author

sikmir commented Mar 28, 2022

I would like to render names for rivers, is it possible now?

@rahra
Copy link
Owner

rahra commented Mar 28, 2022

What you have to do is to let smrender insert nodes at a specific distance and then render the captions on the nodes.
The following rules would do exactly that:

   <way>
      <tag k='waterway' v='river'/>
      <tag k='_action_' v='ins_eqdist:distance=3'/>
   </way>
   <node>
      <tag k='waterway' v='river'/>
      <tag k='_action_' v='cap:font=serif;size=2;key=name;color=blue;anglekey=bearing;angle=90'/>
   </node>

It's not perfect but better than nothing.
Actually I forgot that I did never implement it. I'll put it on my list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants