OpenLayers.Format.WKT - OpenLayers

# 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

Summary

OpenLayers.Format.WKT | Class for reading and writing Well-Known Text.
Constructor |
OpenLayers.Format.WKT | Create a new parser for WKT
Functions |
read | Deserialize a WKT string and return a vector feature or an array of vector features.
write | Serialize 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