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:
@@ -3,41 +3,74 @@
|
||||
* for the full text of the license. */
|
||||
|
||||
/**
|
||||
* Read/WRite GML.
|
||||
* @requires OpenLayers/Format.js
|
||||
* @requires OpenLayers/Feature/Vector.js
|
||||
* @requires OpenLayers/Ajax.js
|
||||
* @requires OpenLayers/Geometry.js
|
||||
*
|
||||
* Class: OpenLayers.Format.GML
|
||||
* Read/Wite GML.
|
||||
*
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Format>
|
||||
*/
|
||||
OpenLayers.Format.GML = OpenLayers.Class.create();
|
||||
OpenLayers.Format.GML.prototype =
|
||||
OpenLayers.Class.inherit( OpenLayers.Format, {
|
||||
|
||||
/*
|
||||
* APIProperty: featureNS
|
||||
* Namespace used for feature attributes. Default matches the NS
|
||||
* used by MapServer output.
|
||||
*/
|
||||
featureNS: "http://mapserver.gis.umn.edu/mapserver",
|
||||
|
||||
/*
|
||||
* APIProperty: featureName
|
||||
* element name for features. Default is 'featureMember'.
|
||||
*/
|
||||
featureName: "featureMember",
|
||||
|
||||
/*
|
||||
* APIProperty: layerName
|
||||
* Name of data layer. Default is 'features'.
|
||||
*/
|
||||
|
||||
layerName: "features",
|
||||
|
||||
/**
|
||||
* APIProperty: geometry
|
||||
* Name of geometry element.
|
||||
*/
|
||||
geometryName: "geometry",
|
||||
|
||||
/**
|
||||
* APIProperty: collectionName
|
||||
* Name of featureCollection element
|
||||
*/
|
||||
collectionName: "FeatureCollection",
|
||||
|
||||
/**
|
||||
* APIProperty: gmlns
|
||||
* GML Namespace
|
||||
*/
|
||||
gmlns: "http://www.opengis.net/gml",
|
||||
|
||||
|
||||
/**
|
||||
* Extract attributes from GML. Most of the time,
|
||||
* this is a significant time usage, due to the need
|
||||
* to recursively descend the XML to search for attributes.
|
||||
*
|
||||
* @type Boolean */
|
||||
/**
|
||||
* APIProperty: extractAttributes
|
||||
* {Boolean} Extract attributes from GML. Most of the time, this is a
|
||||
* significant time usage, due to the need to recursively descend the XML
|
||||
* to search for attributes.
|
||||
*/
|
||||
extractAttributes: true,
|
||||
|
||||
/**
|
||||
* APIMethod: read
|
||||
* Read data from a string, and return a list of features.
|
||||
*
|
||||
* @param {string|XMLNode} data data to read/parse.
|
||||
* Parameters:
|
||||
* data - {String} or {XMLNode} data to read/parse.
|
||||
*/
|
||||
read: function(data) {
|
||||
if (typeof data == "string") {
|
||||
@@ -73,10 +106,13 @@ OpenLayers.Format.GML.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: parseFeature
|
||||
* This function is the core of the GML parsing code in OpenLayers.
|
||||
* It creates the geometries that are then attached to the returned
|
||||
* feature, and calls parseAttributes() to get attribute data out.
|
||||
* @param {DOMElement} xmlNode
|
||||
|
||||
* Parameters:
|
||||
* xmlNode - {<DOMElement>}
|
||||
*/
|
||||
parseFeature: function(xmlNode) {
|
||||
var geom;
|
||||
@@ -178,10 +214,13 @@ OpenLayers.Format.GML.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: parseAttributes
|
||||
* recursive function parse the attributes of a GML node.
|
||||
* Searches for any child nodes which aren't geometries,
|
||||
* and gets their value.
|
||||
* @param {DOMElement} xmlNode
|
||||
*
|
||||
* Parameters:
|
||||
* xmlNode - {<DOMElement>}
|
||||
*/
|
||||
parseAttributes: function(xmlNode) {
|
||||
var nodes = xmlNode.childNodes;
|
||||
@@ -208,10 +247,13 @@ OpenLayers.Format.GML.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: parsePolygonNode
|
||||
*
|
||||
* Parameters:
|
||||
* xmlNode - {XMLNode}
|
||||
*
|
||||
* @param {XMLNode} xmlNode
|
||||
*
|
||||
* @return {OpenLayers.Geometry.Polygon} polygon geometry
|
||||
* Returns:
|
||||
* {<OpenLayers.Geometry.Polygon>} polygon geometry
|
||||
*/
|
||||
parsePolygonNode: function(polygonNode) {
|
||||
var linearRings = OpenLayers.Ajax.getElementsByTagNameNS(polygonNode,
|
||||
@@ -231,12 +273,14 @@ OpenLayers.Format.GML.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: parseCoords
|
||||
* Extract Geographic coordinates from an XML node.
|
||||
* @private
|
||||
* @param {XMLNode} xmlNode
|
||||
*
|
||||
* @return an array of OpenLayers.Geometry.Point points.
|
||||
* @type Array
|
||||
*
|
||||
* Parameters:
|
||||
* xmlNode - {<XMLNode>}
|
||||
*
|
||||
* Returns:
|
||||
* An array of <OpenLayers.Geometry.Point> points.
|
||||
*/
|
||||
parseCoords: function(xmlNode) {
|
||||
var x, y, left, bottom, right, top, bounds;
|
||||
@@ -287,9 +331,12 @@ OpenLayers.Format.GML.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* Accept Feature Collection, and return a string.
|
||||
* APIMethod: write
|
||||
* Accept Feature Array, 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("http://www.opengis.net/wfs", "wfs:" + this.collectionName);
|
||||
@@ -300,10 +347,14 @@ OpenLayers.Format.GML.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* 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);
|
||||
@@ -326,10 +377,12 @@ OpenLayers.Format.GML.prototype =
|
||||
return featureNode;
|
||||
},
|
||||
|
||||
/**
|
||||
/**
|
||||
* Method: buildGeometryNode
|
||||
* builds a GML file with a given geometry
|
||||
*
|
||||
* @param {OpenLayers.Geometry} geometry
|
||||
*
|
||||
* Parameters:
|
||||
* geometry - {<OpenLayers.Geometry>}
|
||||
*/
|
||||
buildGeometryNode: function(geometry) {
|
||||
// TBD test if geoserver can be given a Multi-geometry for a simple-geometry data store
|
||||
@@ -403,11 +456,15 @@ OpenLayers.Format.GML.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: buildCoordinates
|
||||
* builds the coordinates XmlNode
|
||||
* <gml:coordinates decimal="." cs="," ts=" ">...</gml:coordinates>
|
||||
*
|
||||
* @param {OpenLayers.Geometry} geometry
|
||||
* @return {XmlNode} created xmlNode
|
||||
* Parameters:
|
||||
* geometry - {<OpenLayers.Geometry>}
|
||||
*
|
||||
* Returns:
|
||||
* {XmlNode} created xmlNode
|
||||
*/
|
||||
buildCoordinatesNode: function(geometry) {
|
||||
var coordinatesNode = document.createElementNS(this.gmlns, "gml:coordinates");
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -3,25 +3,33 @@
|
||||
* for the full text of the license. */
|
||||
|
||||
/**
|
||||
* Read only KML.
|
||||
* @requires OpenLayers/Format.js
|
||||
* @requires OpenLayers/Feature/Vector.js
|
||||
* @requires OpenLayers/Ajax.js
|
||||
*
|
||||
* Class: OpenLayers.Format.KML
|
||||
* Read only KML. Largely Proof of Concept: does not support advanced Features,
|
||||
* including Polygons.
|
||||
*
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Format>
|
||||
*/
|
||||
OpenLayers.Format.KML = OpenLayers.Class.create();
|
||||
OpenLayers.Format.KML.prototype =
|
||||
OpenLayers.Class.inherit( OpenLayers.Format, {
|
||||
|
||||
featureNS: "http://mapserver.gis.umn.edu/mapserver",
|
||||
|
||||
collectionName: "FeatureCollection",
|
||||
|
||||
/**
|
||||
* APIProperty: kmlns
|
||||
* KML Namespace to use. Defaults to 2.0 namespace.
|
||||
*/
|
||||
kmlns: "http://earth.google.com/kml/2.0",
|
||||
|
||||
/**
|
||||
* APIMethod: read
|
||||
* Read data from a string, and return a list of features.
|
||||
*
|
||||
* @param {string|XMLNode} data data to read/parse.
|
||||
* Parameters:
|
||||
* data - {string} or {XMLNode>} data to read/parse.
|
||||
*/
|
||||
read: function(data) {
|
||||
if (typeof data == "string") {
|
||||
@@ -43,10 +51,13 @@ OpenLayers.Format.KML.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: parseFeature
|
||||
* This function is the core of the KML parsing code in OpenLayers.
|
||||
* It creates the geometries that are then attached to the returned
|
||||
* feature, and calls parseAttributes() to get attribute data out.
|
||||
* @param {DOMElement} xmlNode
|
||||
*
|
||||
* Parameters:
|
||||
* xmlNode - {<DOMElement>}
|
||||
*/
|
||||
parseFeature: function(xmlNode) {
|
||||
var geom;
|
||||
@@ -87,10 +98,13 @@ OpenLayers.Format.KML.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: parseAttributes
|
||||
* recursive function parse the attributes of a KML node.
|
||||
* Searches for any child nodes which aren't geometries,
|
||||
* and gets their value.
|
||||
* @param {DOMElement} xmlNode
|
||||
*
|
||||
* Parameters:
|
||||
* xmlNode - {<DOMElement>}
|
||||
*/
|
||||
parseAttributes: function(xmlNode) {
|
||||
var nodes = xmlNode.childNodes;
|
||||
@@ -117,12 +131,14 @@ OpenLayers.Format.KML.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: parseCoords
|
||||
* Extract Geographic coordinates from an XML node.
|
||||
* @private
|
||||
* @param {XMLNode} xmlNode
|
||||
*
|
||||
* Parameters:
|
||||
* xmlNode - {<XMLNode>}
|
||||
*
|
||||
* @return an array of OpenLayers.Geometry.Point points.
|
||||
* @type Array
|
||||
* Returns:
|
||||
* An array of <OpenLayers.Geometry.Point> points.
|
||||
*/
|
||||
parseCoords: function(xmlNode) {
|
||||
var p = [];
|
||||
|
||||
@@ -3,25 +3,36 @@
|
||||
* for the full text of the license. */
|
||||
|
||||
/**
|
||||
* Read/WRite WFS.
|
||||
* @requires OpenLayers/Format/GML.js
|
||||
*
|
||||
* Class: OpenLayers.Format.WFS
|
||||
* Read/Write WFS.
|
||||
*/
|
||||
OpenLayers.Format.WFS = OpenLayers.Class.create();
|
||||
OpenLayers.Format.WFS.prototype =
|
||||
OpenLayers.Class.inherit( OpenLayers.Format.GML, {
|
||||
|
||||
/**
|
||||
* Property: layer
|
||||
*/
|
||||
layer: null,
|
||||
|
||||
/**
|
||||
* APIProperty: wfsns
|
||||
*/
|
||||
wfsns: "http://www.opengis.net/wfs",
|
||||
|
||||
/*
|
||||
* Constructor: OpenLayers.Format.WFS
|
||||
* Create a WFS-T formatter. This requires a layer: that layer should
|
||||
* have two properties: geometry_column and typename. The parser
|
||||
* for this format is subclassed entirely from GML: There is a writer
|
||||
* only, which uses most of the code from the GML layer, and wraps
|
||||
* it in transactional elements.
|
||||
* @param {Object} options
|
||||
* @param {OpenLayers.Layer} layer
|
||||
*
|
||||
* Parameters:
|
||||
* options - {Object}
|
||||
* layer - {<OpenLayers.Layer>}
|
||||
*/
|
||||
|
||||
initialize: function(options, layer) {
|
||||
@@ -39,10 +50,11 @@ OpenLayers.Format.WFS.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* write
|
||||
* Method: write
|
||||
* Takes a feature list, and generates a WFS-T Transaction
|
||||
*
|
||||
* @param {Array}
|
||||
* Parameters:
|
||||
* features - {Array}
|
||||
*/
|
||||
write: function(features) {
|
||||
|
||||
@@ -64,7 +76,13 @@ OpenLayers.Format.WFS.prototype =
|
||||
}
|
||||
return transaction;
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Method: createFeatureXML
|
||||
*
|
||||
* Parameters:
|
||||
* feature - {<OpenLayers.Feature.Vector>}
|
||||
*/
|
||||
createFeatureXML: function(feature) {
|
||||
var geometryNode = this.buildGeometryNode(feature.geometry);
|
||||
var geomContainer = document.createElementNS(this.featureNS, "feature:" + this.geometryName);
|
||||
@@ -85,10 +103,11 @@ OpenLayers.Format.WFS.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* insert
|
||||
* Method: insert
|
||||
* Takes a feature, and generates a WFS-T Transaction "Insert"
|
||||
*
|
||||
* @param {OpenLayers.Feature.Vector} feature
|
||||
* Parameters:
|
||||
* feature - {<OpenLayers.Feature.Vector>}
|
||||
*/
|
||||
insert: function(feature) {
|
||||
var insertNode = document.createElementNS(this.wfsns, 'wfs:Insert');
|
||||
@@ -97,10 +116,11 @@ OpenLayers.Format.WFS.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* update
|
||||
* Method: update
|
||||
* Takes a feature, and generates a WFS-T Transaction "Update"
|
||||
*
|
||||
* @param {OpenLayers.Feature.Vector} feature
|
||||
* Parameters:
|
||||
* feature - {<OpenLayers.Feature.Vector>}
|
||||
*/
|
||||
update: function(feature) {
|
||||
if (!feature.fid) { alert("Can't update a feature for which there is no FID."); }
|
||||
@@ -130,10 +150,11 @@ OpenLayers.Format.WFS.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* delete
|
||||
* Method: remove
|
||||
* Takes a feature, and generates a WFS-T Transaction "Delete"
|
||||
*
|
||||
* @param {OpenLayers.Feature.Vector} feature
|
||||
* Parameters:
|
||||
* feature - {<OpenLayers.Feature.Vector>}
|
||||
*/
|
||||
remove: function(feature) {
|
||||
if (!feature.attributes.fid) {
|
||||
@@ -152,6 +173,10 @@ OpenLayers.Format.WFS.prototype =
|
||||
return deleteNode;
|
||||
},
|
||||
|
||||
/**
|
||||
* APIMethod: destroy
|
||||
* Remove ciruclar ref to layer
|
||||
*/
|
||||
destroy: function() {
|
||||
this.layer = null;
|
||||
},
|
||||
|
||||
@@ -3,15 +3,29 @@
|
||||
* for the full text of the license. */
|
||||
|
||||
/**
|
||||
* Read and write WKT.
|
||||
* @requires OpenLayers/Format.js
|
||||
*
|
||||
* Class: OpenLayers.Format.WKT
|
||||
* Class for reading and writing Well-Known Text. Create a new instance
|
||||
* with the <OpenLayers.Format.WKT> constructor.
|
||||
*
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Format>
|
||||
*/
|
||||
OpenLayers.Format.WKT = OpenLayers.Class.create();
|
||||
OpenLayers.Format.WKT.prototype =
|
||||
OpenLayers.Class.inherit(OpenLayers.Format, {
|
||||
|
||||
/**
|
||||
* Constructor: OpenLayers.Format.WKT
|
||||
* Create a new parser for WKT
|
||||
*
|
||||
* Parameters:
|
||||
* options - {Object} An optional object whose properties will be set on
|
||||
* this instance
|
||||
*
|
||||
* Return:
|
||||
* {<OpenLayers.Format.WKT>} A new WKT parser.
|
||||
*/
|
||||
initialize: function(options) {
|
||||
this.regExes = {
|
||||
@@ -25,14 +39,18 @@ OpenLayers.Format.WKT.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: read
|
||||
* Deserialize a WKT string and return an OpenLayers.Feature.Vector or an
|
||||
* array of OpenLayers.Feature.Vector. Supports WKT for POINT, MULTIPOINT,
|
||||
* LINESTRING, MULTILINESTRING, POLYGON, MULTIPOLYGON, and
|
||||
* GEOMETRYCOLLECTION.
|
||||
* @param {String} wkt A WKT string
|
||||
* @returns {OpenLayers.Feature.Vector|Array} A feature or array of
|
||||
* features for
|
||||
* GEOMETRYCOLLECTION WKT.
|
||||
*
|
||||
* Parameters:
|
||||
* wkt - {String} A WKT string
|
||||
*
|
||||
* Return:
|
||||
* {<OpenLayers.Feature.Vector>|Array} A feature or array of features for
|
||||
* GEOMETRYCOLLECTION WKT.
|
||||
*/
|
||||
read: function(wkt) {
|
||||
var features, type, str;
|
||||
@@ -48,10 +66,15 @@ OpenLayers.Format.WKT.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: write
|
||||
* Serialize a feature or array of features into a WKT string.
|
||||
* @param {OpenLayers.Feature.Vector|Array} features A feature or array of
|
||||
* features
|
||||
* @returns {String} The WKT string representation of the input geometries
|
||||
*
|
||||
* Parameters:
|
||||
* features - {<OpenLayers.Feature.Vector>|Array} A feature or array of
|
||||
* features
|
||||
*
|
||||
* Return:
|
||||
* {String} The WKT string representation of the input geometries
|
||||
*/
|
||||
write: function(features) {
|
||||
var collection, geometry, type, data, isCollection;
|
||||
@@ -91,7 +114,7 @@ OpenLayers.Format.WKT.prototype =
|
||||
extract: {
|
||||
/**
|
||||
* Return a space delimited string of point coordinates.
|
||||
* @param {OpenLayers.Geometry.Point} point
|
||||
* @param {<OpenLayers.Geometry.Point>} point
|
||||
* @returns {String} A string of coordinates representing the point
|
||||
*/
|
||||
'point': function(point) {
|
||||
@@ -100,7 +123,7 @@ OpenLayers.Format.WKT.prototype =
|
||||
|
||||
/**
|
||||
* Return a comma delimited string of point coordinates from a multipoint.
|
||||
* @param {OpenLayers.Geometry.MultiPoint} multipoint
|
||||
* @param {<OpenLayers.Geometry.MultiPoint>} multipoint
|
||||
* @returns {String} A string of point coordinate strings representing
|
||||
* the multipoint
|
||||
*/
|
||||
@@ -114,7 +137,7 @@ OpenLayers.Format.WKT.prototype =
|
||||
|
||||
/**
|
||||
* Return a comma delimited string of point coordinates from a line.
|
||||
* @param {OpenLayers.Geometry.LineString} linestring
|
||||
* @param {<OpenLayers.Geometry.LineString>} linestring
|
||||
* @returns {String} A string of point coordinate strings representing
|
||||
* the linestring
|
||||
*/
|
||||
@@ -128,7 +151,7 @@ OpenLayers.Format.WKT.prototype =
|
||||
|
||||
/**
|
||||
* Return a comma delimited string of linestring strings from a multilinestring.
|
||||
* @param {OpenLayers.Geometry.MultiLineString} multilinestring
|
||||
* @param {<OpenLayers.Geometry.MultiLineString>} multilinestring
|
||||
* @returns {String} A string of of linestring strings representing
|
||||
* the multilinestring
|
||||
*/
|
||||
@@ -144,7 +167,7 @@ OpenLayers.Format.WKT.prototype =
|
||||
|
||||
/**
|
||||
* Return a comma delimited string of linear ring arrays from a polygon.
|
||||
* @param {OpenLayers.Geometry.Polygon} polygon
|
||||
* @param {<OpenLayers.Geometry.Polygon>} polygon
|
||||
* @returns {String} An array of linear ring arrays representing the polygon
|
||||
*/
|
||||
'polygon': function(polygon) {
|
||||
@@ -159,7 +182,7 @@ OpenLayers.Format.WKT.prototype =
|
||||
|
||||
/**
|
||||
* Return an array of polygon arrays from a multipolygon.
|
||||
* @param {OpenLayers.Geometry.MultiPolygon} multipolygon
|
||||
* @param {<OpenLayers.Geometry.MultiPolygon>} multipolygon
|
||||
* @returns {Array} An array of polygon arrays representing
|
||||
* the multipolygon
|
||||
*/
|
||||
@@ -183,7 +206,7 @@ OpenLayers.Format.WKT.prototype =
|
||||
/**
|
||||
* Return point feature given a point WKT fragment.
|
||||
* @param {String} str A WKT fragment representing the point
|
||||
* @returns {OpenLayers.Feature.Vector} A point feature
|
||||
* @returns {<OpenLayers.Feature.Vector>} A point feature
|
||||
* @private
|
||||
*/
|
||||
'point': function(str) {
|
||||
@@ -196,7 +219,7 @@ OpenLayers.Format.WKT.prototype =
|
||||
/**
|
||||
* Return a multipoint feature given a multipoint WKT fragment.
|
||||
* @param {String} A WKT fragment representing the multipoint
|
||||
* @returns {OpenLayers.Feature.Vector} A multipoint feature
|
||||
* @returns {<OpenLayers.Feature.Vector>} A multipoint feature
|
||||
* @private
|
||||
*/
|
||||
'multipoint': function(str) {
|
||||
@@ -213,7 +236,7 @@ OpenLayers.Format.WKT.prototype =
|
||||
/**
|
||||
* Return a linestring feature given a linestring WKT fragment.
|
||||
* @param {String} A WKT fragment representing the linestring
|
||||
* @returns {OpenLayers.Feature.Vector} A linestring feature
|
||||
* @returns {<OpenLayers.Feature.Vector>} A linestring feature
|
||||
* @private
|
||||
*/
|
||||
'linestring': function(str) {
|
||||
@@ -230,7 +253,7 @@ OpenLayers.Format.WKT.prototype =
|
||||
/**
|
||||
* Return a multilinestring feature given a multilinestring WKT fragment.
|
||||
* @param {String} A WKT fragment representing the multilinestring
|
||||
* @returns {OpenLayers.Feature.Vector} A multilinestring feature
|
||||
* @returns {<OpenLayers.Feature.Vector>} A multilinestring feature
|
||||
* @private
|
||||
*/
|
||||
'multilinestring': function(str) {
|
||||
@@ -249,7 +272,7 @@ OpenLayers.Format.WKT.prototype =
|
||||
/**
|
||||
* Return a polygon feature given a polygon WKT fragment.
|
||||
* @param {String} A WKT fragment representing the polygon
|
||||
* @returns {OpenLayers.Feature.Vector} A polygon feature
|
||||
* @returns {<OpenLayers.Feature.Vector>} A polygon feature
|
||||
* @private
|
||||
*/
|
||||
'polygon': function(str) {
|
||||
@@ -270,7 +293,7 @@ OpenLayers.Format.WKT.prototype =
|
||||
/**
|
||||
* Return a multipolygon feature given a multipolygon WKT fragment.
|
||||
* @param {String} A WKT fragment representing the multipolygon
|
||||
* @returns {OpenLayers.Feature.Vector} A multipolygon feature
|
||||
* @returns {<OpenLayers.Feature.Vector>} A multipolygon feature
|
||||
* @private
|
||||
*/
|
||||
'multipolygon': function(str) {
|
||||
|
||||
Reference in New Issue
Block a user