OpenLayers.Format.WKT

Class for reading and writing Well-Known Text.  Create a new instance with the OpenLayers.Format.WKT constructor.

Inherits from

Summary
OpenLayers.Format.WKTClass for reading and writing Well-Known Text.
Constructor
OpenLayers.Format.WKTCreate a new parser for WKT
Functions
readDeserialize a WKT string and return a vector feature or an array of vector features.
writeSerialize a feature or array of features into a WKT string.

Constructor

OpenLayers.Format.WKT

Create a new parser for WKT

Parameters

options{Object} An optional object whose properties will be set on this instance

Returns

{OpenLayers.Format.WKT} A new WKT parser.

Functions

read

read: function(wkt)

Deserialize a WKT string and return a vector feature or an array of vector features.  Supports WKT for POINT, MULTIPOINT, LINESTRING, MULTILINESTRING, POLYGON, MULTIPOLYGON, and GEOMETRYCOLLECTION.

Parameters

wkt{String} A WKT string

Returns

{<OpenLayers.Feature.Vector>|Array} A feature or array of features for GEOMETRYCOLLECTION WKT.

write

write: function(features)

Serialize a feature or array of features into a WKT string.

Parameters

features{<OpenLayers.Feature.Vector>|Array} A feature or array of features

Returns

{String} The WKT string representation of the input geometries

read: function(wkt)
Deserialize a WKT string and return a vector feature or an array of vector features.
write: function(features)
Serialize a feature or array of features into a WKT string.
Create a new parser for WKT
Base class for format reading/writing a variety of formats.
Close