io module

Functions

read(string | ArrayBuffer | Blob, SpatialDataReadOptions)

Takes a spatial data string or a URL to a file or zipped file and parses the spatial data into GeoJSON objects. Supported spatial data formats: KML, KMZ, GPX, GeoRSS, GML, spatial delimited files (CSV), GeoJSON.

write(azmaps.source.DataSource | azmaps.data.FeatureCollection | azmaps.layer.ImageLayer | OgcMapLayer | azmaps.data.Feature<azmaps.data.Geometry, any> | SpatialDataSet | Array<azmaps.source.DataSource | azmaps.data.FeatureCollection | azmaps.layer.ImageLayer | OgcMapLayer | azmaps.data.Feature<azmaps.data.Geometry, any> | SpatialDataSet>, SpatialXmlWriteOptions & GmlWriteOptions & SpatialCsvWriteOptions)

Writes GeoJSON object data as a geospatial XML string in the specified format.

writeCompressed(azmaps.source.DataSource | azmaps.data.FeatureCollection | azmaps.layer.ImageLayer | OgcMapLayer | azmaps.data.Feature<azmaps.data.Geometry, any> | SpatialDataSet | Array<azmaps.source.DataSource | azmaps.data.FeatureCollection | azmaps.layer.ImageLayer | OgcMapLayer | azmaps.data.Feature<azmaps.data.Geometry, any> | SpatialDataSet>, "Base64" | "Blob" | "ArrayBuffer", SpatialXmlWriteOptions & GmlWriteOptions & SpatialCsvWriteOptions)

Writes GeoJSON object data to a geospatial XML file embedded in a compressed file. The spatial file in the zip file will be names 'doc' and will be assigned an appropriate file extension. Possibly file extensions include; xml, kml, json, csv, tsv, txt.

Function Details

read(string | ArrayBuffer | Blob, SpatialDataReadOptions)

Takes a spatial data string or a URL to a file or zipped file and parses the spatial data into GeoJSON objects. Supported spatial data formats: KML, KMZ, GPX, GeoRSS, GML, spatial delimited files (CSV), GeoJSON.

function read(spatialData: string | ArrayBuffer | Blob, options?: SpatialDataReadOptions): Promise<SpatialDataSet>

Parameters

spatialData

string | ArrayBuffer | Blob

The spatial data string or URL to a file to read.

options
SpatialDataReadOptions

The read options.

Returns

Promise<SpatialDataSet>

write(azmaps.source.DataSource | azmaps.data.FeatureCollection | azmaps.layer.ImageLayer | OgcMapLayer | azmaps.data.Feature<azmaps.data.Geometry, any> | SpatialDataSet | Array<azmaps.source.DataSource | azmaps.data.FeatureCollection | azmaps.layer.ImageLayer | OgcMapLayer | azmaps.data.Feature<azmaps.data.Geometry, any> | SpatialDataSet>, SpatialXmlWriteOptions & GmlWriteOptions & SpatialCsvWriteOptions)

Writes GeoJSON object data as a geospatial XML string in the specified format.

function write(data: azmaps.source.DataSource | azmaps.data.FeatureCollection | azmaps.layer.ImageLayer | OgcMapLayer | azmaps.data.Feature<azmaps.data.Geometry, any> | SpatialDataSet | Array<azmaps.source.DataSource | azmaps.data.FeatureCollection | azmaps.layer.ImageLayer | OgcMapLayer | azmaps.data.Feature<azmaps.data.Geometry, any> | SpatialDataSet>, options?: SpatialXmlWriteOptions & GmlWriteOptions & SpatialCsvWriteOptions): Promise<string>

Parameters

data

azmaps.source.DataSource | azmaps.data.FeatureCollection | azmaps.layer.ImageLayer | OgcMapLayer | azmaps.data.Feature<azmaps.data.Geometry, any> | SpatialDataSet | Array<azmaps.source.DataSource | azmaps.data.FeatureCollection | azmaps.layer.ImageLayer | OgcMapLayer | azmaps.data.Feature<azmaps.data.Geometry, any> | SpatialDataSet>

The GeoJSON objects to retrieve shapes from, to write.

options

SpatialXmlWriteOptions & GmlWriteOptions & SpatialCsvWriteOptions

A set of options that customize how the XML is written.

Returns

Promise<string>

writeCompressed(azmaps.source.DataSource | azmaps.data.FeatureCollection | azmaps.layer.ImageLayer | OgcMapLayer | azmaps.data.Feature<azmaps.data.Geometry, any> | SpatialDataSet | Array<azmaps.source.DataSource | azmaps.data.FeatureCollection | azmaps.layer.ImageLayer | OgcMapLayer | azmaps.data.Feature<azmaps.data.Geometry, any> | SpatialDataSet>, "Base64" | "Blob" | "ArrayBuffer", SpatialXmlWriteOptions & GmlWriteOptions & SpatialCsvWriteOptions)

Writes GeoJSON object data to a geospatial XML file embedded in a compressed file. The spatial file in the zip file will be names 'doc' and will be assigned an appropriate file extension. Possibly file extensions include; xml, kml, json, csv, tsv, txt.

function writeCompressed(data: azmaps.source.DataSource | azmaps.data.FeatureCollection | azmaps.layer.ImageLayer | OgcMapLayer | azmaps.data.Feature<azmaps.data.Geometry, any> | SpatialDataSet | Array<azmaps.source.DataSource | azmaps.data.FeatureCollection | azmaps.layer.ImageLayer | OgcMapLayer | azmaps.data.Feature<azmaps.data.Geometry, any> | SpatialDataSet>, compressFormat?: "Base64" | "Blob" | "ArrayBuffer", options?: SpatialXmlWriteOptions & GmlWriteOptions & SpatialCsvWriteOptions): Promise<string | ArrayBuffer | Blob>

Parameters

data

azmaps.source.DataSource | azmaps.data.FeatureCollection | azmaps.layer.ImageLayer | OgcMapLayer | azmaps.data.Feature<azmaps.data.Geometry, any> | SpatialDataSet | Array<azmaps.source.DataSource | azmaps.data.FeatureCollection | azmaps.layer.ImageLayer | OgcMapLayer | azmaps.data.Feature<azmaps.data.Geometry, any> | SpatialDataSet>

The GeoJSON objects to retrieve shapes from, to write.

compressFormat

"Base64" | "Blob" | "ArrayBuffer"

The compressed file format to use. Options: Base64 (Data URI), Blob, or ArrayBuffer

options

SpatialXmlWriteOptions & GmlWriteOptions & SpatialCsvWriteOptions

A set of options that customize how the data is written.

Returns

Promise<string | ArrayBuffer | Blob>