OpenLayers.Renderer.SVG

Inherits

  • <OpenLayers.Renderer.Elements>
Summary
OpenLayers.Renderer.SVG
Functions
OpenLayers.Renderer.SVG
setExtent
getNodeType
setStyleUse to set all the style attributes to a SVG node.
dashStyle
createNode
createRenderRoot{DOMElement} The specific render engine’s root element
createRoot{DOMElement} The main root element to which we’ll add vectors
createDefs{DOMElement} The element to which we’ll add the symbol definitions
drawPointThis method is only called by the renderer itself.
drawCircleThis method is only called by the renderer itself.
drawLineStringThis method is only called by the renderer itself.
drawLinearRingThis method is only called by the renderer itself.
drawPolygonThis method is only called by the renderer itself.
drawRectangleThis method is only called by the renderer itself.
drawSurfaceThis method is only called by the renderer itself.
importSymboladd a new symbol definition from the rendererer’s symbol hash

Functions

OpenLayers.Renderer.SVG

Parameters

containerID{String}

setExtent

setExtent: function(extent,
resolutionChanged)

Parameters

extent{<OpenLayers.Bounds>}
resolutionChanged{Boolean}

Returns

{Boolean} true to notify the layer that the new extent does not exceed the coordinate range, and the features will not need to be redrawn.  False otherwise.

getNodeType

getNodeType: function(geometry,
style)

Parameters

geometry{<OpenLayers.Geometry>}
style{Object}

Returns

{String} The corresponding node type for the specified geometry

setStyle

setStyle: function(node,
style,
options)

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

Takes care to adjust stroke width and point radius to be resolution-relative

Parameters

node{SVGDomElement} An SVG element to decorate
style{Object}
options{Object} Currently supported options include ‘isFilled’ {Boolean} and ‘isStroked’ {Boolean}

dashStyle

dashStyle: function(style,
widthFactor)

Parameters

style{Object}
widthFactor{Number}

Returns

{String} A SVG compliant ‘stroke-dasharray’ value

createNode

createNode: function(type,
id)

Parameters

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

Returns

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

createRenderRoot

createRenderRoot: function()

Returns

{DOMElement} The specific render engine’s root element

createRoot

createRoot: function()

Returns

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

createDefs

createDefs: function()

Returns

{DOMElement} The element to which we’ll add the symbol definitions

drawPoint

drawPoint: function(node,
geometry)

This method is only called by the renderer itself.

Parameters

node{DOMElement}
geometry{<OpenLayers.Geometry>}

Returns

{DOMElement} or false if the renderer could not draw the point

drawCircle

drawCircle: function(node,
geometry,
radius)

This method is only called by the renderer itself.

Parameters

node{DOMElement}
geometry{<OpenLayers.Geometry>}
radius{Float}

Returns

{DOMElement} or false if the renderer could not draw the circle

drawLineString

drawLineString: function(node,
geometry)

This method is only called by the renderer itself.

Parameters

node{DOMElement}
geometry{<OpenLayers.Geometry>}

Returns

{DOMElement} or null if the renderer could not draw all components of the linestring, or false if nothing could be drawn

drawLinearRing

drawLinearRing: function(node,
geometry)

This method is only called by the renderer itself.

Parameters

node{DOMElement}
geometry{<OpenLayers.Geometry>}

Returns

{DOMElement} or null if the renderer could not draw all components of the linear ring, or false if nothing could be drawn

drawPolygon

drawPolygon: function(node,
geometry)

This method is only called by the renderer itself.

Parameters

node{DOMElement}
geometry{<OpenLayers.Geometry>}

Returns

{DOMElement} or null if the renderer could not draw all components of the polygon, or false if nothing could be drawn

drawRectangle

drawRectangle: function(node,
geometry)

This method is only called by the renderer itself.

Parameters

node{DOMElement}
geometry{<OpenLayers.Geometry>}

Returns

{DOMElement} or false if the renderer could not draw the rectangle

drawSurface

drawSurface: function(node,
geometry)

This method is only called by the renderer itself.

Parameters

node{DOMElement}
geometry{<OpenLayers.Geometry>}

Returns

{DOMElement} or false if the renderer could not draw the surface

importSymbol

importSymbol: function (graphicName)

add a new symbol definition from the rendererer’s symbol hash

Parameters

graphicName{String} name of the symbol to import

Returns

{String}id of the imported symbol
setExtent: function(extent,
resolutionChanged)
getNodeType: function(geometry,
style)
setStyle: function(node,
style,
options)
Use to set all the style attributes to a SVG node.
dashStyle: function(style,
widthFactor)
createNode: function(type,
id)
createRenderRoot: function()
{DOMElement} The specific render engine’s root element
createRoot: function()
{DOMElement} The main root element to which we’ll add vectors
createDefs: function()
{DOMElement} The element to which we’ll add the symbol definitions
drawPoint: function(node,
geometry)
This method is only called by the renderer itself.
drawCircle: function(node,
geometry,
radius)
This method is only called by the renderer itself.
drawLineString: function(node,
geometry)
This method is only called by the renderer itself.
drawLinearRing: function(node,
geometry)
This method is only called by the renderer itself.
drawPolygon: function(node,
geometry)
This method is only called by the renderer itself.
drawRectangle: function(node,
geometry)
This method is only called by the renderer itself.
drawSurface: function(node,
geometry)
This method is only called by the renderer itself.
importSymbol: function (graphicName)
add a new symbol definition from the rendererer’s symbol hash