For many years now, it's been a pet peeve of mine that you couldn't select a label unless the label point was also symbolized. For a Topobase label class, which is supposed to be just a label, this was especially annoying. Obviously, there are ways to make the label point unobtrusive and one soon gets used to selecting a label by using a window, but annotation layers don't have this problem.
First, a little explanation about how to create annotation layers. If you add layers manually using the Data Connect dialog, you have the opportunity to use Enhanced Stylization by clicking the little arrow on the right hand side of the Add to Map button.
Adding a label class, one that has a name ending in _TBL, results in the addition of an annotation layer. This even works if you use the Oracle provider. However, if you generate graphics with the default display model, there is no opportunity to specify enhanced stylization... until now.
The style for an annotation layer is meant for rendering text. One could, of course, add a standard label to the label, but that would be counterproductive.
The style editor for an annotation layer is similar to the standard label style editor, but adds expression builder support for editing the values and a choice of two types of text - MText and Plain.
If you like the behavior of annotations better than point labels, and are satisfied with the performance, you can make annotations the default for label classes by setting up a layer template.
A word of caution is in order, because this involves modifying the Topobase system tables.
Start by saving an annotation layer. The extension of this template file should probably be changed from .layer to .LayerDefinition. Move or copy the file to a location that is accessible by all users or is the same for all users.
Edit the template file with a text editor - it's XML - and only keep the LayerDefinition:
<LayerDefinition ... <LayerDefinition>
Then add a record to the TB_SETTINGS table in TBSYS - not the document TB_SETTINGS:
insert into tb_settings (id, user_id, itemthema, itemkey, itemvalue) values
(tb_settings_s1.nextval, (select id from tb_user where username='TOPOBASE'),
'DISPLAYMODEL', 'PATHLABELTEMPLATE', '<filename>')
where the filename (itemvalue) is the name of the template file. The username should be adjusted if you aren't using TOPOBASE. Commit, and this template will be used for creating label feature classes.
Other possibilities for the itemkey are also possible. This can be very useful when generating display models for large data models, even if you don't keep the templates as the defaults. Here's a small table of the possible values.
ITEMKEY
Purpose
PATHLABELTEMPLATE
template file for Label classes
PATHPOINTTEMPLATE
template file for Point classes
PATHLINETEMPLATE
template file for Line classes
PATHPOLYGONTEMPLATE
template file for Polygon classes
PATHCOLLECTIONTEMPLATE
template file for Collection classes
If you just want Topobase to generate annotation layers and aren't too concerned with the actual style template, you can instead set an itemvalue of '1' for the itemkey 'ANNOTATIONFORLABELFC'. With this set, the default layer for label feature classes (whether they end in _TBL or not) are annotation layers.
Comments