Ranged themes and serialization, Individualvaluetheme, When to use an individualvaluetheme class – Pitney Bowes MapXtreme User Manual

Page 280

Advertising
background image

Chapter 14: Using Themes and Legends

Ranged Themes and Serialization

MapXtreme v7.1

287

Developer Guide

Ranged Themes and Serialization

Beginning with v7.0.0, serialization and deserialization for RangedThemes and RangeLabelThemes
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 RangeTheme and RangeLabelTheme, this is a call to the
MapInfo.Mapping.Thematic.IRangedTheme.Recompute method.

IndividualValueTheme

An Individual Value theme is a modifier theme that show points, lines, or boundaries that are shaded
by individual values contained in a particular field of a dataset. You can use both numerical and
nominal values in individual values maps. MapXtreme gives each unique value its own distinct style.

For example, use an IndividualValue theme to show zoning classifications for parcels of land. Each
zone (commercial, residential, industrial) would display in a different color. Parcels that match the
zone classification would be shaded in that color.

When To Use an IndividualValueTheme Class

If you are shading your points, lines, or boundaries using nominal data, you can shade only by
individual values. Nominal data is either non-numeric data (e.g., name, type of cuisine served, or
brand of automobile sold) or numeric data where the numbers do not represent measurements. For
example, nominal data may be a column containing ID numbers.

Dates are considered numeric data and can be used in both ranged and individual values maps.

VB example:

Public Shared Sub MapInfo_Mapping_Thematics_IndividualValueTheme(ByVal_

map As Map)

‘ Load a map based on one table
map.Load(New MapTableLoader(“World.tab”))
Dim fLyr As FeatureLayer = CType(map.Layers(“world”), FeatureLayer)

‘ Create an individual value theme
Dim thm As IndividualValueTheme = New _
IndividualValueTheme(fLyr, “Country”, “World Pop”)

‘ Add the theme to the FeatureStyleModifiers list
fLyr.Modifiers.Append(thm)
End Sub

Advertising