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

View File

@@ -3,23 +3,42 @@
* for the full text of the license. */
/**
* Write-only GeoRSS.
* @requires OpenLayers/Format.js
*
* Class: OpenLayers.Format.GeoRSS
* Write-only GeoRSS.
*
* Inherits from:
* - <OpenLayers.Format>
*/
OpenLayers.Format.GeoRSS = OpenLayers.Class.create();
OpenLayers.Format.GeoRSS.prototype =
OpenLayers.Class.inherit( OpenLayers.Format, {
/**
* APIProperty: rssns
* RSS namespace to use.
*/
rssns: "http://backend.userland.com/rss2",
/**
* APIProperty: featurens
* Feature Attributes namespace
*/
featureNS: "http://mapserver.gis.umn.edu/mapserver",
/**
* APIProperty: georssns
* GeoRSS namespace to use.
*/
georssns: "http://www.georss.org/georss",
/**
* APIMethod: write
* Accept Feature Collection, and return a string.
*
* @param {Array} List of features to serialize into a string.
* Parameters:
* features - Array({<OpenLayers.Feature.Vector>}) List of features to serialize into a string.
*/
write: function(features) {
var featureCollection = document.createElementNS(this.rssns, "rss");
@@ -29,11 +48,15 @@ OpenLayers.Format.GeoRSS.prototype =
return featureCollection;
},
/**
* Accept an OpenLayers.Feature.Vector, and build a geometry for it.
/**
* Method: createFeatureXML
* Accept an <OpenLayers.Feature.Vector>, and build a geometry for it.
*
* @param {OpenLayers.Feature.Vector} feature
* @returns DOMElement
* Parameters:
* feature - {<OpenLayers.Feature.Vector>}
*
* Returns:
* {DOMElement}
*/
createFeatureXML: function(feature) {
var geometryNode = this.buildGeometryNode(feature.geometry);
@@ -59,9 +82,11 @@ OpenLayers.Format.GeoRSS.prototype =
},
/**
* Method: buildGeometryNode
* builds a GeoRSS node with a given geometry
*
* @param {OpenLayers.Geometry} geometry
* Parameters:
* geometry - {<OpenLayers.Geometry>}
*/
buildGeometryNode: function(geometry) {
var gml = "";
@@ -86,7 +111,13 @@ OpenLayers.Format.GeoRSS.prototype =
}
return gml;
},
/**
* Method: buildCoordinatesNode
*
* Parameters:
* geometry - {<OpenLayers.Geometry>}
*/
buildCoordinatesNode: function(geometry) {
var points = null;