Wrap text labels in tmap "view" mode?

I'm trying to wrap text labels in "view" mode. I implemented code from the following link, and it works perfectly for "plot" mode but not "view" mode:
https://github.com/mtennekes/tmap/issues/255

Has anyone else cracked this?

I too have struggled with advanced formatting in view mode of tmap; I needed standard HTML features - line breaks, bold text, hyperlinks etc. - which proved difficult as {tmap} sanitizes popup labels for HTML code (and a newline does not mean a line break in HTML context; a <br> tag is required).

At the end I ended up using {leaflet} package directly, which on one hand requires maintaining two sets of code for static and dynamic maps + learning two separate sets of syntax rules, but on the other hand gives me the most flexibility in formating.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.