Dotdensitytheme, When to use a dotdensitytheme class – Pitney Bowes MapXtreme User Manual

Page 283

Advertising
background image

Chapter 14: Using Themes and Legends

DotDensityTheme

MapXtreme v7.1

290

Developer Guide

DotDensityTheme

A dot density theme is a style modifier that draws the fill pattern of a region, using dots based on the
numeric value of the theme's expression.

Dot density maps use dots to represent the data value associated with a boundary or region. The
total number of dots in a region represents that region’s data value. If you have 10,000 senior
citizens in a county, and each dot represents 100 senior citizens, there would be 100 dots in the
county boundary.

When To Use a DotDensityTheme Class

A dot density theme is useful for showing raw data where one dot represents a large number of
something: population, number of fast food restaurants, number of distributors who carry a brand of
soda, etc.

For example, if you have a table of population broken down into county boundaries, you could use a
dot density theme to show the concentration of people in each county boundary. There are two
properties you control for dot density maps. You can specify the value of one dot. For example, to
represent 20,000 high school students in Rensselaer County, New York using a dot density theme,
you can specify that one dot represents 200 students. When you shade the county, the map would
be drawn with 100 dots for that county.

VB example:

Public Shared Sub MapInfo_Mapping_Thematics_DotDensityTheme(ByVal map As
Map)

’ Load a map based on one table
map.Load(New MapTableLoader("mexico.tab"))

’ Create a dot density theme.
’ Add it as a modifier.
Dim lyr As FeatureLayer = map.Layers("mexico")
Dim thm As MapInfo.Mapping.Thematics.DotDensityTheme = New
MapInfo.Mapping.Thematics.DotDensityTheme(lyr, "Pop_90", "mexico Pop",
System.Drawing.Color.Red, DotDensitySize.Large)

’ thm.DotColor is System.Drawing.Color.Red
’ thm.DotSize is DotDensitySize.Large

’ Set each dot to represent 20,000 people
thm.ValuePerDot = 20000

End Sub

Advertising