Title adornment, Feature style modifiers – Pitney Bowes MapXtreme User Manual
Page 252

Chapter 12: Adding Mapping Capability to Your Applications
Feature Style Modifiers
MapXtreme v7.1
259
Developer Guide
Public Shared Sub MapInfo_Mapping_ScaleBarAdornment(ByVal mapControl1 As _
MapControl)
' Create a scalebar
Dim sba As ScaleBarAdornment = New ScaleBarAdornment(mapControl1.Map)
' Position the scalebar at the lower right corner of map
Dim x As Integer = mapControl1.Map.Size.Width - sba.Size.Width
Dim y As Integer = mapControl1.Map.Size.Height - sba.Size.Height
sba.Location = New System.Drawing.Point(x, y)
' Add the control to the map
Dim sbac As ScaleBarAdornmentControl = New
ScaleBarAdornmentControl(sba, _
mapControl1.Map)
mapControl1.AddAdornment(sba, sbac)
End Sub
Title Adornment
A Title adornment is a text object drawn on the map to represent a map title or to provide a text to
clarify other information on the map. In MapXtreme you use the TitleAdornment class to create a title
and add it to the map.
VB example:
Public Shared Sub MapInfo_Mapping_TitleAdornment(ByVal mapControl1 As
MapControl)
’ Create a Titlebar
Dim ta As New MapInfo.Mapping.TitleAdornment(New
System.Drawing.Size(100, 50), mapControl1.Map)
ta.Title = "This is a watermark"
mapControl1.Map.Adornments.Append(ta)
End Sub
Feature Style Modifiers
Feature style modifiers allow a way of changing/modifying the style of a Feature before it is drawn.
These classes use the sparse attribute aspect of CompositeStyle object to only modify the part of
the style in which you are interested. Range, Individual Value, and Dot Density themes are style
modifiers. Thematics are covered in detail in
Chapter 14: Using Themes and Legends
. The
diagram below shows a UML representation of the Modifier and thematics hierarchy.