Class: Format

SuperMap.Format

Read and write format class base classes in various formats. Its subclasses should contain and implement the read and write methods.

new SuperMap.Format(options)

Format.js, line 4
Name Type Description
options Object

The optional parameters.

Name Type Default Description
keepData boolean false optional

If set to true, the data attribute points to the parsed object (such as JSON or XML data objects).

data Object optional

When the keepData attribute is set to true, This is the string that is passed to the read operation to be parsed.

Classes

GeoJSON
JSON
WKT

Members

dataObject

When the keepData attribute is set to true, This is the string that is passed to the read operation to be parsed.

keepDataObject

Keep a reference to the data that is read recently (through the attribute). The default value is false

Methods

destroy()

Format.js, line 36

Disposes the resource. The property that references resource is set to null.

read(data)

Format.js, line 44

To read data from a string.

Name Type Description
data string

Read the data.

write(object){string}

Format.js, line 53

Write an object to a string.

Name Type Description
object Object

An object that can be serializable.

Returns:
Type Description
string The object is written as a string.