• No results found

When you want to specify MapBasic style elements in an XML request, you provide your style element (such as a <StartStyle> element) with a type attribute that has one of the following values:

MapBasicLineStyleMapBasicAreaStyleMapBasicPointStyleMapBasicTextStyleMapBasicCompositeStyle For example: <ns5:StartStyle xsi:type="ns6:MapBasicLineStyle"> <ns6:MapBasicPen> <ns6:Width>1</ns6:Width> <ns6:Pattern>81</ns6:Pattern> <ns6:Color>red</ns6:Color> </ns6:MapBasicPen> </ns5:StartStyle>

MapBasicLineStyle

A style of type MapBasicLineStyle specifies the visual characteristics of a line. The style can contain aMapBasicPenelement.

MapBasicPen

Description

The MapBasicPen element defines a style for a linear object such as a line, polyline arc, or the border of a region.

Elements

Table 2: Elementson page 126 lists the elements that can be contained by a MapBasicPen element.

Table 2: Elements

Description Element

An integer value from 0 to 7 specifying the thickness of the line (in pixels). Width

To create an invisible line style, specify a width of 0 and a pattern value of 1.

An integer value from 1 to 118 specifying the line pattern. Pattern

The available line patterns, and corresponding pattern codes, are shown in

Line Pattern Codeson page 161.

A string value specifying the color of the pen stroke. Color

The value can be any valid CSS color. (See

http://www.w3.org/TR/REC-CSS1#color-units.)

Example

This example specifies a solid red line that is two pixels wide.

<ns6:MapBasicPen> <ns6:Width>2</ns6:Width> <ns6:Pattern>2</ns6:Pattern> <ns6:Color>red</ns6:Color> </ns6:MapBasicPen>

MapBasicAreaStyle

A style of type MapBasicAreaStyle specifies the visual characteristics of a filled area. The style can contain aMapBasicPenelement or aMapBasicBrushelement or both.

MapBasicPen

Description

The MapBasicPen element defines a style for a linear object such as a line, polyline arc, or the border of a region.

Elements

Table 3: Elementson page 127 lists the elements that can be contained by a MapBasicPen element.

Table 3: Elements

Description Element

An integer value from 0 to 7 specifying the thickness of the line (in pixels). Width

To create an invisible line style, specify a width of 0 and a pattern value of 1.

An integer value from 1 to 118 specifying the line pattern. Pattern

The available line patterns, and corresponding pattern codes, are shown in

Line Pattern Codeson page 161.

A string value specifying the color of the pen stroke. Color

The value can be any valid CSS color. (See

http://www.w3.org/TR/REC-CSS1#color-units.)

Example

This example specifies a solid red line that is two pixels wide.

<ns6:MapBasicPen> <ns6:Width>2</ns6:Width> <ns6:Pattern>2</ns6:Pattern> <ns6:Color>red</ns6:Color> </ns6:MapBasicPen>

MapBasicBrush

Description

The MapBasicBrush element defines a style for a filled object, such as a circle or region.

Elements

Table 4: Elementson page 127 lists the elements that can be contained by a MapBasicBrush element.

Table 4: Elements

Description Element

An integer value from 1 to 8 and from 12 to 175 specifying the fill pattern. Pattern

Pattern codes 9 to 11 are reserved.

Note:

The available fill patterns, and corresponding pattern codes, are shown in

Fill Pattern Codeson page 162.

A string value specifying the foreground color. ForegroundColor

The value can be any valid CSS color. (See

http://www.w3.org/TR/REC-CSS1#color-units.) A string value specifying the background color. BackgroundColor

The value can be any valid CSS color. (See

http://www.w3.org/TR/REC-CSS1#color-units.)

Omitting this element will yield a transparent background.

Note:

Example

This example specifies a fill pattern of blue horizontal lines on a yellow background.

<ns6:MapBasicBrush> <ns6:Pattern>3</ns6:Pattern> <ns6:ForegroundColor>blue</ns6:ForegroundColor> <ns6:BackgroundColor>yellow</ns6:BackgroundColor> </ns6:MapBasicBrush>

MapBasicPointStyle

A style of type MapBasicPointStyle specifies the visual characteristics of a symbol. The style can contain aMapBasicSymbolelement.

MapBasicSymbol

The MapBasicSymbol element has a type attribute that specifies one of the following types of symbol. • MapBasic30Symbol

MapBasicFontSymbol

MapBasicBitmapSymbol

MapBasic30Symbol

Description

A MapBasicSymbol element of type MapBasic30Symbol specifies the size, color, and code of a symbol taken from the MapInfo 3.0 symbol set.

Elements

Table 5: Elementson page 129 lists the elements that can be contained by a MapBasicSymbol element of type MapBasic30Symbol.

Table 5: Elements

Description Element

An integer value from 31 to 67 specifying the symbol code to use from the MapInfo 3.0 symbol set.

Shape

The MapInfo 3.0 symbol set, and corresponding code for each symbol, is shown inMapInfo 3.0 Symbol Codeson page 163.

A string value specifying the color of the symbol. Color

The value can be any valid CSS color. (See

http://www.w3.org/TR/REC-CSS1#color-units.)

An integer value from 1 to 255 specifying the point size of the symbol. Size Example <ns6:MapBasicSymbol xsi:type="ns6:MapBasic30Symbol"> <ns6:Shape>56</ns6:Shape> <ns6:Color>blue</ns6:Color> <ns6:Size>12</ns6:Size> </ns6:MapBasicSymbol>

MapBasicFontSymbol

Description

A MapBasicSymbol element of type MapBasicFontSymbol specifies the character code of a symbol taken from a TrueType symbol font, as well as various other attributes of the symbol.

Elements

Table 6: Elementson page 129 lists the elements that can be contained by a MapBasicSymbol element of type MapBasicFontSymbol.

Table 6: Elements

Description Element

An integer value of 32 or larger specifying the character to use from a TrueType symbol font.

Shape

To specify an invisible symbol, use 32 (the space character).

Note:

A string value specifying the color of the symbol. Color

The value can be any valid CSS color. (See

http://www.w3.org/TR/REC-CSS1#color-units.)

An integer value from 1 to 255 specifying the point size of the symbol. Size

A string value specifying the name of the TrueType symbol font to use (for example, "WingDings").

A boolean value (true or false) specifying whether the symbol should be bold (true) or plain (false).

Bold

The default value is false.

An enumeration value specifying the type of border to draw around the symbol. Possible values are:

Border

• normal • halo

The value normal draws a regular black border around the symbol. The value halo draws a white halo border around the symbol.

A boolean value (true or false) specifying whether to have a drop-shadow drawn behind the symbol. A value of false (the default) specifies no drop-shadow.

DropShadow

A floating-point value from 0 to 360 specifying the rotation angle of the symbol in degrees. Rotation Example <ns6:MapBasicSymbol xsi:type="ns6:MapBasicFontSymbol"> <ns6:Shape>32</ns6:Shape> <ns6:Color>blue</ns6:Color> <ns6:Size>12</ns6:Size> <ns6:FontName>Wingdings</ns6:FontName> <ns6:Bold>true</ns6:Bold> <ns6:Border>normal</ns6:Border> <ns6:Rotation>45</ns6:Rotation> </ns6:MapBasicSymbol>

MapBasicBitmapSymbol

Description

A MapBasicSymbol element of type MapBasicBitmapSymbol specifies the name of a bitmap symbol file, as well as the size and color of the symbol.

Elements

Table 7: Elementson page 130 lists the elements that can be contained by a MapBasicSymbol element of type MapBasicBitmapSymbol.

Table 7: Elements

Description Element

A string value specifying the URI of the bitmap image file. URI

A string value specifying the color of the symbol. Any non-white pixels in the bitmap are set to this color.

Description Element

The value can be any valid CSS color. (See

http://www.w3.org/TR/REC-CSS1#color-units.)

An integer value from 1 to 255 specifying the point size of the symbol. Size

If this element is omitted, the image is rendered at its native width and height in pixels.

A boolean value (true or false) specifying whether white pixels in the bitmap should be set to transparent (true) or left as opaque white (false). Transparent

The default value is true.

MapBasicTextStyle

A style of type MapBasicTextStyle specifies the visual characteristics of a text style. The complexType style contains the elementMapBasicFontStyle.

MapBasicFontStyle

Description

The MapBasicFontStyle element defines the font style portion of aMapBasicTextStyle.

Elements

Table 8: Elementson page 131 lists the elements that can be contained by a MapBasicFontStyle element.

Table 8: Elements

Description Element

Identifies the name of the font to use. For example, Arial or MapInfo Symbols, etc. MapInfo Fonts are installed with the product while other fonts are used from the system.

FontName

Controls text attributes, according to the following list: Style • 0 - Plain • 1 - Bold • 2 - Italic • 4 - Underline • 8 - Strikethrough • 32 - Shadow • 256 - Halo • 512 - All Caps • 1024 - Expanded

The height of the characters in points. Size

A string value specifying the foreground color of the text. ForegroundColor

The value can be any valid CSS color. (See

A string value specifying the background color of the text. BackgroundColor

The value can be any valid CSS color. (See

http://www.w3.org/TR/REC-CSS1#color-units.)

Example

This example specifies a font style: Verdana 12 pt italic, black with red background.

<ns6:MapBasicFontStyle> <ns6:FontName>Verdana</ns6:FontName> <ns6:Size>12</ns6:Size> <ns6:Style>2</ns6:Style> <ns6:ForegroundColor>black</ns6:ForegroundColor> <ns6:BackgroundColor>red</ns6:BackgroundColor> </ns6:MapBasicFontStyle>

MapBasicCompositeStyle

A style of type MapBasicCompositeStyle specifies the visual characteristics of a mixed set of geometry types such as lines and areas. The style can contain any or all of the following elements:LineStyle,

AreaStyle, andPointStyle.

LineStyle

The LineStyle element is used within a style of type MapBasicCompositeStyle to contain a

MapBasicPenelement.

AreaStyle

The AreaStyle element is used within a style of type MapBasicCompositeStyle to contain a

MapBasicPenelement or aMapBasicBrushelement or both.

PointStyle

The PointStyle element is used within a style of type MapBasicCompositeStyle to contain a

MapBasicSymbolelement.

Related documents