OpenLayers. Renderer.VML

Render vector features in browsers with VML capability.  Construct a new VML renderer with the OpenLayers.Renderer.VML constructor.

Note that for all calculations in this class, we use toFixed() to round a float value to an integer.  This is done because it seems that VML doesn’t support float values.

Inherits from

Summary
Render vector features in browsers with VML capability.
{String} XML Namespace URN
Create a new VML renderer.
Deconstruct the renderer.
Determine whether a browser supports this renderer.
Set the renderer’s extent
Set the size of the drawing surface
Get the noode type for a geometry
Use to set all the style attributes to a VML node.
Get the geometry’s bounds, convert it to our vml coordinate system, then set the node’s position, size, and local coordinate system.
Create a new node
Determine whether a node is of a given type
Create the renderer root
Create the main root element
Render a point
Render a circle.
Render a linestring.
Render a linearring
Render a line.
Render a polygon
Render a rectangle

Properties

xmlns

{String} XML Namespace URN

Constructor

OpenLayers. Renderer.VML

Create a new VML renderer.

Parameters

containerID{String} The id for the element that contains the renderer

Functions

destroy

destroy: function()

Deconstruct the renderer.

supported

supported: function()

Determine whether a browser supports this renderer.

Returns

{Boolean} The browser supports the VML renderer

setExtent

setExtent: function(extent)

Set the renderer’s extent

Parameters

extent{OpenLayers.Bounds}

setSize

setSize: function(size)

Set the size of the drawing surface

Parameters

size{OpenLayers.Size} the size of the drawing surface

getNodeType

getNodeType: function(geometry)

Get the noode type for a geometry

Parameters

geometry{OpenLayers.Geometry}

Returns

{String} The corresponding node type for the specified geometry

setStyle

setStyle: function(node,
style,
options,
geometry)

Use to set all the style attributes to a VML node.

Parameters

node{DOMElement}
style{Object}
options{Object}
isFilled{Boolean}
isStroked{Boolean}
geometry{OpenLayers.Geometry}

setNodeDimension

setNodeDimension: function(node,
geometry)

Get the geometry’s bounds, convert it to our vml coordinate system, then set the node’s position, size, and local coordinate system.

Parameters

node{DOMElement}
geometry{OpenLayers.Geometry}

createNode

createNode: function(type,
id)

Create a new node

Parameters

type{String} Kind of node to draw
id{String} Id for node

Returns

{DOMElement} A new node of the given type and id

nodeTypeCompare

nodeTypeCompare: function(node,
type)

Determine whether a node is of a given type

Parameters

type{String} Kind of node to draw
id{String} Id for node

Returns

{Boolean} Whether or not the specified node is of the specified type

createRenderRoot

createRenderRoot: function()

Create the renderer root

Returns

{DOMElement} The specific render engine’s root element

createRoot

createRoot: function()

Create the main root element

Returns

{DOMElement} The main root element to which we’ll add vectors

drawPoint

drawPoint: function(node,
geometry)

Render a point

Parameters

node{DOMElement}
geometry{OpenLayers.Geometry}

drawCircle

drawCircle: function(node,
geometry,
radius)

Render a circle.  Size and Center a circle given geometry (x,y center) and radius

Parameters

node{DOMElement}
geometry{OpenLayers.Geometry}
radius{float}

drawLineString

drawLineString: function(node,
geometry)

Render a linestring.

Parameters

node{DOMElement}
geometry{OpenLayers.Geometry}

drawLinearRing

drawLinearRing: function(node,
geometry)

Render a linearring

Parameters

node{DOMElement}
geometry{OpenLayers.Geometry}

DrawLine

Render a line.

Parameters

node{DOMElement}
geometry{OpenLayers.Geometry}
closeLine{Boolean} Close the line?  (make it a ring?)

drawPolygon

drawPolygon: function(node,
geometry)

Render a polygon

Parameters

node{DOMElement}
geometry{OpenLayers.Geometry}

drawRectangle

drawRectangle: function(node,
geometry)

Render a rectangle

Parameters

node{DOMElement}
geometry{OpenLayers.Geometry}

drawCurve

drawCurve: function(node,
geometry)

Parameters

node{DOMElement}
geometry{OpenLayers.Geometry}

drawSurface

drawSurface: function(node,
geometry)

Parameters

node{DOMElement}
geometry{OpenLayers.Geometry}
destroy: function()
Deconstruct the renderer.
supported: function()
Determine whether a browser supports this renderer.
setExtent: function(extent)
Set the renderer’s extent
setSize: function(size)
Set the size of the drawing surface
getNodeType: function(geometry)
Get the noode type for a geometry
setStyle: function(node,
style,
options,
geometry)
Use to set all the style attributes to a VML node.
setNodeDimension: function(node,
geometry)
Get the geometry’s bounds, convert it to our vml coordinate system, then set the node’s position, size, and local coordinate system.
createNode: function(type,
id)
Create a new node
nodeTypeCompare: function(node,
type)
Determine whether a node is of a given type
createRenderRoot: function()
Create the renderer root
createRoot: function()
Create the main root element
drawPoint: function(node,
geometry)
Render a point
drawCircle: function(node,
geometry,
radius)
Render a circle.
drawLineString: function(node,
geometry)
Render a linestring.
drawLinearRing: function(node,
geometry)
Render a linearring
drawPolygon: function(node,
geometry)
Render a polygon
drawRectangle: function(node,
geometry)
Render a rectangle
drawCurve: function(node,
geometry)
drawSurface: function(node,
geometry)
Create a new VML renderer.
This is another virtual class in that it should never be instantiated by itself as a Renderer.
Instances of this class represent bounding boxes.
Instances of this class represent a width/height pair
A Geometry is a description of a geographic object.