Writer Directives
The directives listed below are processed by the VML writer. The suffixes shown are prefixed by the current <WriterKeyword> in a mapping file. By default, the <WriterKeyword> for the VML writer is VML.
DATASET
Required/Optional: Required
The value for this directive is the name of the VML file to be created. You may want to add the .html extension to the file name since the file produced is an HTML file. If a file with this name already exists, then the file will be overwritten. A typical mapping file fragment specifying an output VML data set looks like:
VML_DATASET /tmp/outputFile
Workbench Parameter: Destination Vector Markup Language (VML) File
LEFT
Required/Optional: Optional
This directive specifies the left position on the web page for the top-level group element. The top-level group element is the container for all VML features that are drawn.
The syntax for VML LEFT is:
<WriterKeyword>_LEFT <value> (where <value> is in CSS length units)
The default value for this directive is 100pt.
Note: CSS length values are formed by an optional + or -, followed by a number, followed by a two-letter abbreviation that indicates the unit. There are two types of length units—relative and absolute. Relative length units give a length relative to another length property. The following relative units are available: em—ems, the height of the element’s font; ex—x-height, the height of the letter ‘x’; and px—pixels, relative to the canvas resolution. Absolute length units are highly dependent on the output medium. The following absolute units are available: in—inches; cm—centimeters; mm—millimeters; pt—points; and pc—picas. For more information on CSS units, please see the CSS1 or CSS2 specifications on the http://www.w3.org website.
TOP
Required/Optional: Optional
This directive specifies the top position on the web page for the top-level group element.
The syntax for VML TOP is:
<WriterKeyword>_TOP <top> (where <top> is in CSS length units)
The default value for this directive is 100pt.
Note: The values for the LEFT and TOP directive are written out to be the values for the CSS “left” and “top” style attributes of the top-level group element, respectively. You can modify these two CSS style attributes, with any text editor, to reposition the drawing on the web page. Note that the CSS “left” and “top” style attributes are ignored by web browsers if the CSS position style for a shape is not set to absolute. By default, the VML writer sets the top-level group CSS position style to absolute. If this is not suitable, you may use a text editor to change the position style attribute to be either static or relative.
WIDTH
Required/Optional: Optional
This directive sets the width, in CSS units, of the containing block for the top-level group element.
The syntax for VML WIDTH is:
<WriterKeyword>_WIDTH <width> (where <width> is in CSS length units)
The default value for this directive is 512pt.
HEIGHT
Required/Optional: Optional
This directive sets the height, in CSS units, of the containing block for the top-level group element.
The syntax for VML HEIGHT is:
<WriterKeyword>_HEIGHT <height> (where <height> is in CSS length units)
The default value for this directive is 512pt.
Note: The values for the WIDTH and HEIGHT directives are written out to be the values for the CSS width and height style attributes of the top-level group element, respectively. These CSS style attributes for the group may be modified in the translated output file to change the size of the vector drawing on the web page. Changing these does not affect the local coordinate space set by the top-level group element.
COORDSIZE
Required/Optional: Optional
This directive defines the number of units along the width and height of the containing block for the top-level group element.
The syntax for VML COORDSIZE is:
<WriterKeyword>_COORDSIZE <width> <height>
Note: The value for this directive becomes the value for the VML coordsize attribute in the top-level group element. This value should not be modified after the VML output file has been written. Modifying this in the VML output file produces a malformed vector drawing because the position of all elements within the group were calculated based on the original values given by the COORDSIZE and COORDORIGIN directives.
COORDORIGIN
Required/Optional: Optional
This directive defines the coordinate at the top left corner of the containing block for the top-level group element. The positive y-axis is downwards.
The syntax for VML COORDORIGIN is:
<WriterKeyword>_COORDORIGIN <left> <top>
Note: The value for this directive becomes the value for the VML coordorigin attribute in the top-level group element. The y-axis is inverted; positive is downwards.
SPATIAL_EXTENT
Required/Optional: Optional
This directive fixes the spatial extent that the VML output covers, in ground units. The specified spatial extent must be greater than or equal to the minimum bounding rectangle of the feature data. This directive when used in conjunction with the COORDSIZE and COORDORIGIN directives is useful for maintaining the same VML coordinate space for different output VML files that were translated at different times. Assuming that the SPATIAL_EXTENT, COORDSIZE and COORDORIGIN were kept invariant for all translations, the contents of the output VML files may then be combined into one file by copying and pasting the shapes from the different groups into a single group. If this directive is not specified, then the spatial extent will be set equal to the minimum bounding rectangle of the feature data.
The syntax for VML SPATIAL_EXTENT is:
<WriterKeyword>_SPATIAL_EXTENT <min-x> <min-y> <max-x> <max-y>
KEEP_ASPECT_RATIO
Required/Optional
Optional
This directive directs the VML writer to maintain the original aspect ratio—determined by spatial extent in ground units—of the input feature data.
The syntax for VML KEEP_ASPECT_RATIO is:
<WriterKeyword>_KEEP_ASPECT_RATIO (YES|NO)
The default value for this directive is YES.
PRETTY_PRINT
Required/Optional: Optional
This directive gives the option for the VML writer to print the output file in a more attractive format.
The syntax for VML PRETTY_PRINT is:
<WriterKeyword>_PRETTY_PRINT (YES|NO)
The default value for this directive is NO.
Note: Enabling this option produces a considerably larger VML output file due to extra blank spaces.