MapinfoTextObjectStyle

Description

A MapinfoTextObjectStyle element defines a composite style for a legacy MapInfo text object. Legacy MapInfo text objects can be defined only in a MapInfo native data file, also known as a TAB file.

A MapinfoTextObjectStyle element contains styles for the text content (defined by a FontStyle element) and the optional callout line (defined by an LineStyle element).

Context

Table 1 lists the elements that can contain, or be contained by, a MapinfoTextObjectStyle element.

Table 1. Context
Contained by Element Contains

NamedStyle or CompositeStyle

MapinfoTextObjectStyle

FontStyle and LineStyle

Attributes

Table 2 lists the attributes of a MapinfoTextObjectStyle element.

Table 2. Attributes
Attribute Description

id

A unique identifier for the element.

name

A descriptive name for the element.

Example

This example specifies a 12-point sans serif font for the text content, and 1-pixel black line for the callout line.

<?xml version="1.0" encoding="UTF-8"?>
<NamedStyle
    version="MXP_WorkSpace_1_5"
    xmlns="http://www.mapinfo.com/mxp">
    <MapinfoTextObjectStyle>
        <FontStyle
            family="Microsoft Sans Serif"
            font-style="normal"
            effect="white"
            effect-opacity="1"
            effect-type="none"
            font-weight="normal"
            text-decoration="none"
            text-case="default"
            shadow="false"
            expand="false"
            size="12"
            size-unit="mapinfo:length pt"
            stroke="black"/>
        <LineStyle
            stroke="black"
            stroke-opacity="1"
            width="1"
            width-unit="mapinfo:imagesize pixel">
            <Pen>mapinfo:pen 2</Pen>
        </LineStyle>
    </MapinfoTextObjectStyle>
</NamedStyle>