The Label and Go plug-in draws multiple labels on screen. It is mainly used for interactive scenes, but it can also be used for regular scene design. Traditionally, label drawing has been done by repeatedly copying a design. This method gives you full control over the look of the label, but limits the number of labels which can be used as every label has at least two containers. Also, if the number of labels exceed 500 containers, it may cause a performance issue.
Label and Go gives fewer options for design, but since all design is done for one container performance is still good using 70,000 labels.
Note: This plug-in is located in: Plugins -> Geometry plug-ins -> Maps
This page contains information on the following topics and procedures:
Label and Go Properties
Global
Data source: Defines the type of source the plug-in should render. Label and Go supports the following data sources:
Auto labels: Uses labels of the entire world.
CWM labels: Uses labels created by CWM Client.
Streets: Uses street labels (created by 3D Road Manager or CWM Client).
Other: Uses other labels. Currently Viz World supports the KML Reader.
Local file: Determines the shape file that contains names and geo positions.
Shields: Allows the designer to set designs for road types such as highways, interstates, etc., and to use an iconic representation of the street instead of the street name. This is based on street data and currently only supports Tom-Tom data for the USA. During import of the street data, a CSV file is created under plugin\data\maps\DesignMappings, which contains all the types of shields found in the data. The Mapping column in this file can be edited to map the shield types to specific user designs, and then the Label and Go plug-in is used to read the file.
Labels Draw Style
On Map: Places the labels on the same camera as the navigator camera.
Overlay: Places the labels on the second camera (normally front layer).
Alpha fade time: Determines the amount of time (fields) for new labels to appear or disappear.
Max number of labels: Determines the maximum number of label to render including all the labels so far (other Label and Go are taken into account as well).
Culling bounding box: Scales the real bounding box to avoid too many labels on screen.
Line spacing: Determines line spacing when using two lines.
Design
Font: Sets the font used by all labels.
Label Type: Selects from the default types of labels when using auto-labels on Data Source (Country, Capital, etc). Using POI-1, POI-2 and so on, allows definition of the name of the style, for example: Earthquake, Explosion, etc.
Render: Renders the selected label design type (for example, Country, POI-1 and so on) when set to
On
.View Distance: Sets the distance from where the label style should be visible.
Set Distance: Sets the View Distance property based on the current distance of the map.
Priority: Overwrites the default priority which is based on type and town size.
Caption/Background/Pointer: The Caption, Background and Pointer properties are different for each type of design, and are described below.
Buttons
All Off: Turns off all labels, except the one currently being edited.
All On: Turns on all labels.
Copy setting from type above/below: Copies the settings from the label type above/below.
Outline Quality: Determines the quality when background is set to outline.
Outline Quality Mask: Selects the mask to use so it does not interfere with the scene regular makes.
Debug: Draws a green rectangle around all/current labels. (useful to see the bounding box).
Caption
Caption
Hide: Displays only the pointer of each label.
Show: Displays both the pointer and the text of each label.
Text color: Sets the color of the text.
Text Size: Sets the size of the text. Text size influences all sizes.
Max size: Limits the size of the text on either X or X/Y axis when set to either Scale X or ScaleX/Y.
Max width: Sets the maximum width the text should take and scales the text either on X or XY based on the Max Size setting.
X/Y Offset: Offsets the text on X/Y from its latitude and longitude.
Rotate: Rotates labels to follow the street when set to
On
. When set toOff
they are not rotated.
Background
Background: Defines the background type for the text (none/rectangle/image/outline).
Size: Sets the size of the background in relation to the text in percent (%).
Image: Sets a background image for the text.
Background color: Sets the background color.
Outline color: Sets the outline color.
Outline width: Sets the outline width.
Background Fixed Size, Background X, Background Y: Defines the X/Y size of the background when set to fixed size.
Pointer
Point: Sets the type of point.
Caption position: Sets the position of the label in relation to the point.
Point Color: Sets the color of the point.
Point Size: Sets the size of the point.
Point Distance (%): Sets the distance of the label in relation to the point in percent (%).
Point BG: Enables (
On
) or disables (Off
) the Point BG properties.Point BG Color: Sets the points background color.
Point BG Size (%): Sets the points background size in percent (%).
Communication
Interactive Mode: This property is here for backwards compatibility only. The recommended way is to use MTButton instead.
Shared Memory Type: Changes between Scene-, Global- and Distributed-Shared Memory.
Shared Memory Identifier: Sets the Shared Memory key name.
Set Data Pool: Enables the distribution of the data to a DataPool structure using the same name as the Shared Memory Identifier.
Shared Memory Communication with Label and Go
To send labels via shared memory to Label and Go, you need to send:
Id,Label,
long
,
lat style ( optional )
Each label must start with id
.
Example
dim Variable as string
dim array as Array[string]
\qMy data separated my
new
line
dim data as String = GetParameterString(
"Data"
)
data.Split(
"\n\r"
, array)
\qDepending on label
@Go
setting
Variable =
"LABELANDGO_"
Variable.Append(
"ADDLABELS"
)
Scene.Map[Variable] = array
Working with Label and Go
To Create a Label and Go Scene
Add Atlas to your scene tree.
Open the Navigator editor, click Miscellaneous and set Interactive Mode to Always.
Add a sub container to the GeoReferenceMap.
Add the Label and Go plug-in to the new container.
Click the Scene Editor’s E button. E enables the handling of interactive script/plug-in events. Interactive scripts and plug-ins are those related to mouse or keyboard actions.
Click the scene and zoom in and out with your mouse to see the labels appear.
Open the Label and Go editor to test the settings.
To Use Viz Config for Interactive Communication
When using MTButton for interactivity together with Label and Go:
The input method from Viz Config is used (for example, Win 7, PPI, TUIO, mouse).
The clicked label on the map is published to shared memory.
Notes
All data sources may select from ten different designs.
There are currently no limits as to how many Label and Go plug-ins can be used by one scene.
Label collision is calculated and taken into account. Other types of labels (for example, design using Street Labels) are not taken into account.
Label and Go currently works on flat maps only.