Skip to main content

New answers tagged

1 vote
Accepted

Display point labels alternatively to left and right

It's always good to check the output in the calculator. % is the modulus operator, which will work directly on the fid, without the need to divide by 6316. Dividing by 6316 will probably in most ...
Tom Brennan's user avatar
  • 5,012
1 vote

Formatted labels' multiline text will not align left

Figured it out. The label 'Callout' was set to 'Composite' (not sure why). Changing it to 'Background' resolved the issue. It's unclear to me why this does not work for 'Composite' label callouts (...
Son of a Beach's user avatar
2 votes

Retrieving label boundaries within QGIS Layout maps

With the help of @Matt I have revised my code example. Now it shows label boundaries in Layout maps as well, even if the labels are not shown in main map canvas. BTW: I'm using the context variables @...
christoph's user avatar
  • 5,727
2 votes
Accepted

Retrieving label boundaries within QGIS Layout maps

You can retrieve the label bounds of the map item in the layout like so: p = QgsProject.instance() manager = p.layoutManager() # get reference to the example layout layout = manager.layouts()[0] # ...
Matt's user avatar
  • 17.2k
0 votes

Change default label font for styling

You can do it in Settings -> Style Manager -> Text Format
Oleg Zheleznyy's user avatar
2 votes
Accepted

Adding underscores to specific letters in attribute-driven label using ArcGIS Pro

Open the Windows app Character Map, and search for macron or low line in the Searh for box at the bottom. These two search options should show you available Unicode characters that have underscores ...
Midavalo's user avatar
  • 29.7k
2 votes
Accepted

Mid_point label placement using Geometry Generator in QGIS

Find the midpoint by line_interpolate_point with distance=line length/2: collect_geometries( start_point($geometry), line_interpolate_point($geometry, $length/2), end_point($geometry) ...
BERA's user avatar
  • 73.7k
1 vote

How to offset labels in Leaflet using field-based rotation & offset?

Labels can be created with rotated marker which has L.divIcon icon with desired text and icon anchor that puts them at the end of arrows. Since marker is rotated and so icon text is rotated with it, ...
TomazicM's user avatar
  • 26k
1 vote
Accepted

How to offset labels in Leaflet using field-based rotation & offset?

This is not really an answer yet, just comment with some code, since obviously you don't understand my comments to three of your questions. There is absolutely no need to add any offset to the arrow ...
TomazicM's user avatar
  • 26k

Top 50 recent answers are included