Merge all changes from the naturaldocs sandbox. This brings all the work that

has been done in the NaturalDocs branch back to trunk. Thanks to everyone who
helped out in making this happen. (I could list people, but the list would
be long, and I'm already mentally on vacation.)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@3545 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-06-29 15:59:20 +00:00
parent f1c61fd0d6
commit 3948913bfc
107 changed files with 8658 additions and 4011 deletions
+158 -60
View File
@@ -3,8 +3,9 @@
* for the full text of the license. */
/**
* @class
* @requires OpenLayers/Renderer.js
*
* Class: OpenLayers.Renderer.Elements
* This is another virtual class in that it should never be instantiated by
* itself as a Renderer. It exists because there is *tons* of shared
* functionality between different vector libraries which use nodes/elements
@@ -15,25 +16,36 @@
* element-based renderer. The details of creating each node and drawing the
* paths are of course different, but the machinery is the same.
*
* @requires OpenLayers/Renderer.js
* Inherits:
* - <OpenLayers.Renderer>
*/
OpenLayers.Renderer.Elements = OpenLayers.Class.create();
OpenLayers.Renderer.Elements.prototype =
OpenLayers.Class.inherit(OpenLayers.Renderer, {
/** @type DOMElement */
/**
* Property: rendererRoot
* {DOMElement}
*/
rendererRoot: null,
/** @type DOMElement */
/**
* Property: root
* {DOMElement}
*/
root: null,
/** @type String */
/**
* Property: xmlns
* {String}
*/
xmlns: null,
/**
* @constructor
* Constructor: OpenLayers.Renderer.Elements
*
* @param {String} containerID
* Parameters:
* containerID - {String}
*/
initialize: function(containerID) {
OpenLayers.Renderer.prototype.initialize.apply(this, arguments);
@@ -46,7 +58,7 @@ OpenLayers.Renderer.Elements.prototype =
},
/**
*
* Method: destroy
*/
destroy: function() {
@@ -60,8 +72,8 @@ OpenLayers.Renderer.Elements.prototype =
},
/**
* Method: clear
* Remove all the elements from the root
* @private
*/
clear: function() {
if (this.root) {
@@ -71,30 +83,33 @@ OpenLayers.Renderer.Elements.prototype =
}
},
/** This function is in charge of asking the specific renderer which type
* of node to create for the given geometry. All geometries in an
* Elements-based renderer consist of one node and some attributes. We
* have the nodeFactory() function which creates a node for us, but it
* takes a 'type' as input, and that is precisely what this function
* tells us.
/**
* Method: getNodeType
* This function is in charge of asking the specific renderer which type
* of node to create for the given geometry. All geometries in an
* Elements-based renderer consist of one node and some attributes. We
* have the nodeFactory() function which creates a node for us, but it
* takes a 'type' as input, and that is precisely what this function
* tells us.
*
* Parameters:
* geometry - {<OpenLayers.Geometry>}
*
* @param geometry {OpenLayers.Geometry}
*
* @returns The corresponding node type for the specified geometry
* @type String
* @private
* Return:
* {String} The corresponding node type for the specified geometry
*/
getNodeType: function(geometry) { },
/**
* Method: drawGeometry
* Draw the geometry, creating new nodes, setting paths, setting style,
* setting featureId on the node. This method should only be called
* by the renderer itself.
* setting featureId on the node. This method should only be called
* by the renderer itself.
*
* @param {OpenLayers.Geometry} geometry
* @param {Object} style
* @param {String} featureId
* @private
* Parameters:
* geometry - {<OpenLayers.Geometry>}
* style - {Object}
* featureId - {String}
*/
drawGeometry: function(geometry, style, featureId) {
@@ -119,15 +134,16 @@ OpenLayers.Renderer.Elements.prototype =
this.drawGeometryNode(node, geometry);
},
/**
/**
* Method: drawGeometryNode
* Given a node, draw a geometry on the specified layer.
* node and geometry are required arguments, style is optional.
* This method is only called by the render itself.
* node and geometry are required arguments, style is optional.
* This method is only called by the render itself.
*
* @param {DOMElement} node
* @param {OpenLayers.Geometry} geometry
* @param {Object} style
* @private
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
* style - {Object}
*/
drawGeometryNode: function(node, geometry, style) {
style = style || node._style;
@@ -168,43 +184,126 @@ OpenLayers.Renderer.Elements.prototype =
this.setStyle(node, style, options, geometry);
},
/**
* virtual functions for drawing different Geometries.
* These should all be implemented by subclasses.
* These methods are only called by the render itself.
*
* @param {DOMElement} node
* @param {OpenLayers.Geometry} geometry
* @private
*/
/**
* Method: drawPoint
* Virtual function for drawing Point Geometry.
* Should be implemented by subclasses.
* This method is only called by the renderer itself.
*
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
*/
drawPoint: function(node, geometry) {},
/**
* Method: drawLineString
* Virtual function for drawing LineString Geometry.
* Should be implemented by subclasses.
* This method is only called by the renderer itself.
*
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
*/
drawLineString: function(node, geometry) {},
/**
* Method: drawLinearRing
* Virtual function for drawing LinearRing Geometry.
* Should be implemented by subclasses.
* This method is only called by the renderer itself.
*
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
*/
drawLinearRing: function(node, geometry) {},
/**
* Method: drawPolygon
* Virtual function for drawing Polygon Geometry.
* Should be implemented by subclasses.
* This method is only called by the renderer itself.
*
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
*/
drawPolygon: function(node, geometry) {},
/**
* Method: drawRectangle
* Virtual function for drawing Rectangle Geometry.
* Should be implemented by subclasses.
* This method is only called by the renderer itself.
*
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
*/
drawRectangle: function(node, geometry) {},
/**
* Method: drawCircle
* Virtual function for drawing Circle Geometry.
* Should be implemented by subclasses.
* This method is only called by the renderer itself.
*
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
*/
drawCircle: function(node, geometry) {},
/**
* Method: drawCurve
* Virtual function for drawing Curve Geometry.
* Should be implemented by subclasses.
* This method is only called by the renderer itself.
*
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
*/
drawCurve: function(node, geometry) {},
/**
* Method: drawSurface
* Virtual function for drawing Surface Geometry.
* Should be implemented by subclasses.
* This method is only called by the renderer itself.
*
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
*/
drawSurface: function(node, geometry) {},
/**
* @param evt {Object} an OpenLayers.Event object
* Method: getFeatureIdFromEvent
*
* Parameters:
* evt - {Object} An <OpenLayers.Event> object
*
* @returns A geometry from an event that happened on a layer
* @type OpenLayers.Geometry
* @private
* Return:
* {<OpenLayers.Geometry>} A geometry from an event that
* happened on a layer
*/
getFeatureIdFromEvent: function(evt) {
var node = evt.target || evt.srcElement;
return node._featureId;
},
/** Erase a geometry from the renderer. In the case of a multi-geometry,
* we cycle through and recurse on ourselves. Otherwise, we look for a
* node with the geometry.id, destroy its geometry, and remove it from
* the DOM.
/**
* Method: eraseGeometry
* Erase a geometry from the renderer. In the case of a multi-geometry,
* we cycle through and recurse on ourselves. Otherwise, we look for a
* node with the geometry.id, destroy its geometry, and remove it from
* the DOM.
*
* @param {OpenLayers.Geometry} geometry
* @private
* Parameters:
* geometry - {<OpenLayers.Geometry>}
*/
eraseGeometry: function(geometry) {
if ((geometry.CLASS_NAME == "OpenLayers.Geometry.MultiPoint") ||
@@ -226,20 +325,19 @@ OpenLayers.Renderer.Elements.prototype =
},
/**
* @private
*
* Method: nodeFactory
* Create new node of the specified type, with the (optional) specified id.
*
* If node already exists with same ID and type, we remove it and then
* call ourselves again to recreate it.
*
* @param {String} id
* @param {String} type Kind of node to draw
* @param {OpenLayers.Geometry} geometry
* Parameters:
* id - {String}
* type - {String} type Kind of node to draw
* geometry - {<OpenLayers.Geometry>}
*
* @returns A new node of the given type and id
* @type DOMElement
* @private
* Return:
* {DOMElement} A new node of the given type and id
*/
nodeFactory: function(id, type, geometry) {
var node = $(id);
+148 -95
View File
@@ -3,31 +3,43 @@
* for the full text of the license. */
/**
* @class
*
* @requires OpenLayers/Renderer/Elements.js
*
* Class: OpenLayers.Renderer.SVG
*
* Inherits:
* - <Openlayers.Renderer.Elements>
*/
OpenLayers.Renderer.SVG = OpenLayers.Class.create();
OpenLayers.Renderer.SVG.prototype =
OpenLayers.Class.inherit(OpenLayers.Renderer.Elements, {
/** @type String */
/**
* Property: xmlns
* {String}
*/
xmlns: "http://www.w3.org/2000/svg",
// Firefox has a limitation where values larger or smaller than about
// 15000 in an SVG document lock the browser up. This works around it.
/** @type Integer */
/**
* Property: maxPixel
* {Integer} Firefox has a limitation where values larger or smaller than
* about 15000 in an SVG document lock the browser up. This
* works around it.
*/
maxPixel: 15000,
/** @type Float
@private */
/**
* Property: localResolution
* {Float}
*/
localResolution: null,
/**
* @constructor
* Constructor: OpenLayers.Renderer.SVN
*
* @param {String} containerID
* Parameters:
* containerID - {String}
*/
initialize: function(containerID) {
if (!this.supported()) {
@@ -38,15 +50,17 @@ OpenLayers.Renderer.SVG.prototype =
},
/**
*
* APIMethod: destroy
*/
destroy: function() {
OpenLayers.Renderer.Elements.prototype.destroy.apply(this, arguments);
},
/**
* @returns Whether or not the browser supports the SVG renderer
* @type Boolean
* APIMethod: supported
*
* Return:
* {Boolean} Whether or not the browser supports the SVG renderer
*/
supported: function() {
var svgFeature = "http://www.w3.org/TR/SVG11/feature#SVG";
@@ -57,8 +71,10 @@ OpenLayers.Renderer.SVG.prototype =
},
/**
* @param {OpenLayers.Bounds} extent
* @private
* Method: setExtent
*
* Parameters:
* extent - {<OpenLayers.Bounds>}
*/
setExtent: function(extent) {
OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,
@@ -97,12 +113,11 @@ OpenLayers.Renderer.SVG.prototype =
},
/**
* function
*
* sets the size of the drawing surface
*
* @param size {OpenLayers.Size} the size of the drawing surface
* @private
* Method: setSize
* Sets the size of the drawing surface.
*
* Parameters:
* size - {<OpenLayers.Size>} The size of the drawing surface
*/
setSize: function(size) {
OpenLayers.Renderer.prototype.setSize.apply(this, arguments);
@@ -115,11 +130,13 @@ OpenLayers.Renderer.SVG.prototype =
/**
* @param geometry {OpenLayers.Geometry}
* Method: getNodeType
*
* @returns The corresponding node type for the specified geometry
* @type String
* @private
* Parameters:
* geometry - {<OpenLayers.Geometry>}
*
* Return:
* {String} The corresponding node type for the specified geometry
*/
getNodeType: function(geometry) {
var nodeType = null;
@@ -148,17 +165,18 @@ OpenLayers.Renderer.SVG.prototype =
},
/**
* Method: setStyle
* Use to set all the style attributes to a SVG node.
*
* Note: takes care to adjust stroke width and point radius
* to be resolution-relative
* Takes care to adjust stroke width and point radius to be
* resolution-relative
*
* @param node {SVGDomElement} an SVG element to decorate
* @param {Object} style
* @param {Object} options
* @option isFilled {boolean}
* @option isStroked {boolean}
* @private
* Parameters:
* node - {SVGDomElement} An SVG element to decorate
* style - {Object}
* options - {Object} Currently supported options include
* 'isFilled' {Boolean} and
* 'isStroked' {Boolean}
*/
setStyle: function(node, style, options) {
style = style || node._style;
@@ -194,13 +212,14 @@ OpenLayers.Renderer.SVG.prototype =
},
/**
* @private
*
* @param {String} type Kind of node to draw
* @param {String} id Id for node
* Method: createNode
*
* @returns A new node of the given type and id
* @type DOMElement
* Parameters:
* type - {String} Kind of node to draw
* id - {String} Id for node
*
* Return:
* {DOMElement} A new node of the given type and id
*/
createNode: function(type, id) {
var node = document.createElementNS(this.xmlns, type);
@@ -211,22 +230,24 @@ OpenLayers.Renderer.SVG.prototype =
},
/**
* @private
*
* @param {String} type Kind of node to draw
* @param {String} id Id for node
* Method: nodeTypeCompare
*
* @returns Whether or not the specified node is of the specified type
* @type Boolean
* Parameters:
* node - {SVGDomElement} An SVG element
* type - {String} Kind of node
*
* Return:
* {Boolean} Whether or not the specified node is of the specified type
*/
nodeTypeCompare: function(node, type) {
return (type == node.nodeName);
},
/**
* @returns The specific render engine's root element
* @type DOMElement
* @private
* Method: createRenderRoot
*
* Return:
* {DOMElement} The specific render engine's root element
*/
createRenderRoot: function() {
var id = this.container.id + "_svgRoot";
@@ -235,9 +256,10 @@ OpenLayers.Renderer.SVG.prototype =
},
/**
* @returns The main root element to which we'll add vectors
* @type DOMElement
* @private
* Method: createRoot
*
* Return:
* {DOMElement} The main root element to which we'll add vectors
*/
createRoot: function() {
var id = this.container.id + "_root";
@@ -257,20 +279,26 @@ OpenLayers.Renderer.SVG.prototype =
* *
**************************************/
/**
* @param {DOMElement} node
* @param {OpenLayers.Geometry} geometry
* @private
*/
/**
* Method: drawPoint
* This method is only called by the renderer itself.
*
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
*/
drawPoint: function(node, geometry) {
this.drawCircle(node, geometry, 1);
},
/**
* @param {DOMElement} node
* @param {OpenLayers.Geometry} geometry
* @param {float} radius
* @private
/**
* Method: drawCircle
* This method is only called by the renderer itself.
*
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
* radius - {Float}
*/
drawCircle: function(node, geometry, radius) {
var resolution = this.getResolution();
@@ -290,29 +318,38 @@ OpenLayers.Renderer.SVG.prototype =
},
/**
* @param {DOMElement} node
* @param {OpenLayers.Geometry} geometry
* @private
*/
/**
* Method: drawLineString
* This method is only called by the renderer itself.
*
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
*/
drawLineString: function(node, geometry) {
node.setAttributeNS(null, "points", this.getComponentsString(geometry.components));
},
/**
* @param {DOMElement} node
* @param {OpenLayers.Geometry} geometry
* @private
*/
/**v
* Method: drawLinearRing
* This method is only called by the renderer itself.
*
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
*/
drawLinearRing: function(node, geometry) {
node.setAttributeNS(null, "points", this.getComponentsString(geometry.components));
},
/**
* @param {DOMElement} node
* @param {OpenLayers.Geometry} geometry
* @private
*/
/**
* Method: drawPolygon
* This method is only called by the renderer itself.
*
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
*/
drawPolygon: function(node, geometry) {
var d = "";
var draw = true;
@@ -337,11 +374,14 @@ OpenLayers.Renderer.SVG.prototype =
}
},
/**
* @param {DOMElement} node
* @param {OpenLayers.Geometry} geometry
* @private
*/
/**
* Method: drawRectangle
* This method is only called by the renderer itself.
*
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
*/
drawRectangle: function(node, geometry) {
// This needs to be reworked
var x = (geometry.x / resolution + this.left);
@@ -364,11 +404,14 @@ OpenLayers.Renderer.SVG.prototype =
},
/**
* @param {DOMElement} node
* @param {OpenLayers.Geometry} geometry
* @private
*/
/**
* Method: drawCurve
* This method is only called by the renderer itself.
*
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
*/
drawCurve: function(node, geometry) {
var d = null;
var draw = true;
@@ -394,11 +437,14 @@ OpenLayers.Renderer.SVG.prototype =
}
},
/**
* @param {DOMElement} node
* @param {OpenLayers.Geometry} geometry
* @private
*/
/**
* Method: drawSurface
* This method is only called by the renderer itself.
*
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
*/
drawSurface: function(node, geometry) {
// create the svg path string representation
@@ -428,8 +474,10 @@ OpenLayers.Renderer.SVG.prototype =
},
/**
* @param {Array} components array of points
* @private
* Method: getComponentString
*
* Parameters:
* components - {Array} Array of points
*/
getComponentsString: function(components) {
var strings = [];
@@ -444,8 +492,13 @@ OpenLayers.Renderer.SVG.prototype =
/**
* @param {OpenLayers.Geometry.Point} point
* @private
* Method: getShortString
*
* Parameters:
* point - {<OpenLayers.Geometry.Point>}
*
* Return:
* {String}
*/
getShortString: function(point) {
var resolution = this.getResolution();
+139 -79
View File
@@ -3,25 +3,35 @@
* for the full text of the license. */
/**
* @class
* @requires OpenLayers/Renderer/Elements.js
*
* Class: 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.
*
* @requires OpenLayers/Renderer/Elements.js
* Inherits from:
* - <OpenLayers.Renderer.Elements>
*/
OpenLayers.Renderer.VML = OpenLayers.Class.create();
OpenLayers.Renderer.VML.prototype =
OpenLayers.Class.inherit(OpenLayers.Renderer.Elements, {
/** @type String */
/**
* Property: xmlns
* {String} XML Namespace URN
*/
xmlns: "urn:schemas-microsoft-com:vml",
/**
* @constructor
*
* @param {String} containerID
* Constructor: OpenLayers.Renderer.VML
* Create a new VML renderer.
*
* Parameters:
* containerID - {String} The id for the element that contains the renderer
*/
initialize: function(containerID) {
if (!this.supported()) {
@@ -36,15 +46,19 @@ OpenLayers.Renderer.VML.prototype =
},
/**
*
* APIMethod: destroy
* Deconstruct the renderer.
*/
destroy: function() {
OpenLayers.Renderer.Elements.prototype.destroy.apply(this, arguments);
},
/**
* @returns Whether or not the browser supports the VML renderer
* @type Boolean
* APIMethod: supported
* Determine whether a browser supports this renderer.
*
* Return:
* {Boolean} The browser supports the VML renderer
*/
supported: function() {
var supported = document.namespaces;
@@ -52,7 +66,11 @@ OpenLayers.Renderer.VML.prototype =
},
/**
* @param {OpenLayers.Bounds} extent
* Method: setExtent
* Set the renderer's extent
*
* Parameters:
* extent - {<OpenLayers.Bounds>}
*/
setExtent: function(extent) {
OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,
@@ -70,9 +88,11 @@ OpenLayers.Renderer.VML.prototype =
/**
* Method: setSize
* Set the size of the drawing surface
*
* @param size {OpenLayers.Size} the size of the drawing surface
* Parameters:
* size - {<OpenLayers.Size>} the size of the drawing surface
*/
setSize: function(size) {
OpenLayers.Renderer.prototype.setSize.apply(this, arguments);
@@ -84,12 +104,15 @@ OpenLayers.Renderer.VML.prototype =
this.root.style.height = "100%";
},
/**
* @param geometry {OpenLayers.Geometry}
*
* @returns The corresponding node type for the specified geometry
* @type String
* @private
/**
* Method: getNodeType
* Get the noode type for a geometry
*
* Parameters:
* geometry - {<OpenLayers.Geometry>}
*
* Return:
* {String} The corresponding node type for the specified geometry
*/
getNodeType: function(geometry) {
var nodeType = null;
@@ -114,15 +137,16 @@ OpenLayers.Renderer.VML.prototype =
},
/**
* Method: setStyle
* Use to set all the style attributes to a VML node.
*
* @param {DOMElement} node
* @param {Object} style
* @param {Object} options
* @option isFilled {boolean}
* @option isStroked {boolean}
* @param {OpenLayers.Geometry} geometry
* @private
* Parameters:
* node - {DOMElement}
* style - {Object}
* options - {Object}
* isFilled - {Boolean}
* isStroked - {Boolean}
* geometry - {<OpenLayers.Geometry>}
*/
setStyle: function(node, style, options, geometry) {
style = style || node._style;
@@ -175,12 +199,14 @@ OpenLayers.Renderer.VML.prototype =
},
/** Get the geometry's bounds, convert it to our vml coordinate system,
* then set the node's position, size, and local coordinate system.
/**
* Method: setNodeDimension
* Get the geometry's bounds, convert it to our vml coordinate system,
* then set the node's position, size, and local coordinate system.
*
* @param {DOMElement} node
* @param {OpenLayers.Geometry} geometry
* @private
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
*/
setNodeDimension: function(node, geometry) {
@@ -204,14 +230,16 @@ OpenLayers.Renderer.VML.prototype =
node.coordsize = scaledBox.getWidth()+ " " + scaledBox.getHeight();
},
/**
* @private
/**
* Method: createNode
* Create a new node
*
* @param {String} type Kind of node to draw
* @param {String} id Id for node
*
* @returns A new node of the given type and id
* @type DOMElement
* Parameters:
* type - {String} Kind of node to draw
* id - {String} Id for node
*
* Return:
* {DOMElement} A new node of the given type and id
*/
createNode: function(type, id) {
var node = document.createElement(type);
@@ -221,14 +249,16 @@ OpenLayers.Renderer.VML.prototype =
return node;
},
/**
* @private
/**
* Method: nodeTypeCompare
* Determine whether a node is of a given type
*
* @param {String} type Kind of node to draw
* @param {String} id Id for node
*
* @returns Whether or not the specified node is of the specified type
* @type Boolean
* Parameters:
* type - {String} Kind of node to draw
* id - {String} Id for node
*
* Return:
* {Boolean} Whether or not the specified node is of the specified type
*/
nodeTypeCompare: function(node, type) {
@@ -250,9 +280,11 @@ OpenLayers.Renderer.VML.prototype =
},
/**
* @returns The specific render engine's root element
* @type DOMElement
* @private
* Method: createRenderRoot
* Create the renderer root
*
* Return:
* {DOMElement} The specific render engine's root element
*/
createRenderRoot: function() {
var id = this.container.id + "_vmlRoot";
@@ -261,9 +293,11 @@ OpenLayers.Renderer.VML.prototype =
},
/**
* @returns The main root element to which we'll add vectors
* @type DOMElement
* @private
* Method: createRoot
* Create the main root element
*
* Return:
* {DOMElement} The main root element to which we'll add vectors
*/
createRoot: function() {
var id = this.container.id + "_root";
@@ -278,20 +312,26 @@ OpenLayers.Renderer.VML.prototype =
**************************************/
/**
* @param {DOMElement} node
* @param {OpenLayers.Geometry} geometry
* @private
* Method: drawPoint
* Render a point
*
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
*/
drawPoint: function(node, geometry) {
this.drawCircle(node, geometry, 1);
},
/** Size and Center a circle given geometry (x,y center) and radius
/**
* Method: drawCircle
* Render a circle.
* Size and Center a circle given geometry (x,y center) and radius
*
* @param {DOMElement} node
* @param {OpenLayers.Geometry} geometry
* @param {float} radius
* @private
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
* radius - {float}
*/
drawCircle: function(node, geometry, radius) {
@@ -308,28 +348,37 @@ OpenLayers.Renderer.VML.prototype =
/**
* @param {DOMElement} node
* @param {OpenLayers.Geometry} geometry
* @private
* Method: drawLineString
* Render a linestring.
*
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
*/
drawLineString: function(node, geometry) {
this.drawLine(node, geometry, false);
},
/**
* @param {DOMElement} node
* @param {OpenLayers.Geometry} geometry
* @private
* Method: drawLinearRing
* Render a linearring
*
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
*/
drawLinearRing: function(node, geometry) {
this.drawLine(node, geometry, true);
},
/**
* @param {DOMElement} node
* @param {OpenLayers.Geometry} geometry
* @param {Boolean} closeLine Close the line? (make it a ring?)
* @private
* Method: DrawLine
* Render a line.
*
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
* closeLine - {Boolean} Close the line? (make it a ring?)
*/
drawLine: function(node, geometry, closeLine) {
@@ -352,9 +401,12 @@ OpenLayers.Renderer.VML.prototype =
},
/**
* @parm {DOMElement} node
* @param {OpenLayers.Geometry} geometry
* @private
* Method: drawPolygon
* Render a polygon
*
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
*/
drawPolygon: function(node, geometry) {
this.setNodeDimension(node, geometry);
@@ -381,9 +433,12 @@ OpenLayers.Renderer.VML.prototype =
},
/**
* @parm {DOMElement} node
* @param {OpenLayers.Geometry} geometry
* @private
* Method: drawRectangle
* Render a rectangle
*
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
*/
drawRectangle: function(node, geometry) {
var resolution = this.getResolution();
@@ -397,9 +452,11 @@ OpenLayers.Renderer.VML.prototype =
/**
* @parm {DOMElement} node
* @param {OpenLayers.Geometry} geometry
* @private
* Method: drawCurve
*
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
*/
drawCurve: function(node, geometry) {
this.setNodeDimension(node, geometry);
@@ -424,9 +481,11 @@ OpenLayers.Renderer.VML.prototype =
},
/**
* @parm {DOMElement} node
* @param {OpenLayers.Geometry} geometry
* @private
* Method: drawSurface
*
* Parameters:
* node - {DOMElement}
* geometry - {<OpenLayers.Geometry>}
*/
drawSurface: function(node, geometry) {
@@ -450,5 +509,6 @@ OpenLayers.Renderer.VML.prototype =
node.path = path;
},
/** @final @type String*/
CLASS_NAME: "OpenLayers.Renderer.VML"
});