OOM Undocumented Feature – Rotating Control Labels

One problem which my club has come across when assembling Street-O maps using OpenOrienteeringMap is where control labels clash with other features on the map – they may obscure important underlying topology, or intrude on the circles denoting other nearby controls, as shown in the first image below.

To fix this, you can manually specify the angle that the label appears at with respect to the control circle. I haven’t yet built this in to the online map builder, partly because I didn’t want to clutter the UI with too many options, partly because I haven’t got around to it, and partly because the variables that allow labels to be positioned as such is not yet in the released version of OpenLayers (it is in the trunk) that the map builder is based on, so I’ve had to patch my version specially – I’m reluctant to do too much coding in this area before it’s formally released.

…anyway, to fix it, first produce your map as normal. Then, notice the faint horizontal black line on the bottom left of the PDF? This is actually text which represents a partial URL that allows the map to be recreated. Zoom in to the bottom left in your PDF reader, and copy the line of text into a text editor.

The next step is to edit the label angles. Find the section starting “controls=“. Everything beyond this is a control, each control is defined as four numbers, each seperated by a comma (and no spaces). A comma is also used to separate each control. e.g. controls=1a,1b,1c,1d,2a,2b,2c,2d – where 1a, 1b, 1c and 1d are the four attributes for control 1, etc. The attributes are control number, label angle (clockwise from north), latitude and longitude. The lat/lon coordinates look funny – they use the “EPSG900913” Google-style coordinates. The label angle is the one to change – they all default to 45 (top right), changing this to, for example, 180, will set the label to be directly below the circle.

Once this is done, copy the long line of text and append it to the URL http://casa.oobrien.com/maptiler/pdf? in your web browser. Make sure there’s no comma at the end. Press enter and you should get back a new PDF with the corrected angles, as seen in the second image below. (N.B. the URL may change in the future, I’m piggy-backing off one of my work project websites at the moment for this.)


Before


After

One Comment

  1. […] for control numbers to overlap (or be near) other control circles, causing confusion. There was a non-trivial workaround for this last point. The new version, which I’m releasing today as a beta (while it awaits […]

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.