Individualvaluelabeltheme, When to use an individualvaluelabeltheme class, Individualvalue themes and serialization – Pitney Bowes MapXtreme User Manual

Page 282

Advertising
background image

Chapter 14: Using Themes and Legends

IndividualValueLabelTheme

MapXtreme v7.1

289

Developer Guide

IndividualValueLabelTheme

This class creates an individual value thematic which operates on a layer's labels. For a more
detailed discussion of individual value themes, see the section

IndividualValueTheme

.

When To Use an IndividualValueLabelTheme Class

As with ranged label themes, individual value label themes are also useful when you want use the
labels to convey information about what you are labeling. When working with street data, for
example, you could use an individual value label theme to label different types of roads with different
fonts. In this case, a highway would be represented by a label with a different style than the label for
a county road.

VB example:

Public Shared Sub
MapInfo_Mapping_Thematics_IndividualValueLabelTheme(ByVal labelSource As
MapInfo.Mapping.LabelSource, ByVal columnExpr As String, ByVal _

themeAlias As String)

‘ Create new individual value label theme
Dim theme As IndividualValueLabelTheme = New _

IndividualValueLabelTheme(labelSource.Table, columnExpr, themeAlias)

‘ Add the label modifier to the label layer.
Dim labelModifier As MapInfo.Mapping.LabelModifier = CType(theme, _

MapInfo.Mapping.LabelModifier)

labelSource.Modifiers.Insert(0, labelModifier)
End Sub

IndividualValue Themes and Serialization

Beginning with v7.0.0, serialization and deserialization for IndividualValueThemes and
IndividualValueLabelThemes has been changed in an effort to boost performance.

The changes are during theme serialization, when the theme's bin or category record counts are
serialized. Upon deserialization, the record counts are no longer recomputed; rather the serialized
record counts are applied to the theme. This change was put in place to improve upon
serialization/deserialization performance.

It is important to note that for applications that are expecting to have their theme record counts
updated upon deserialization will have to add logic to update the theme bin or category record
counts after deserialization. For IndividualValueTheme and IndividualValueLabelTheme, this is a call
to the MapInfo.Mapping.Thematics.IModifierTheme.RecomputeBins method.

Advertising