new WKTFormat(options)
Usage
import { WKTFormat } from '@supermapgis/iclient-leaflet';
new WKTFormat(options);<script type="text/javascript" src="https://iclient.supermap.io/dist/leaflet/iclient-leaflet.js"></script>
<script>
new L.supermap.Format.WKT({paramsNames});
// 弃用的写法
new SuperMap.Format.WKT(options);
</script>
common/format/WKT.js, line 15
| Name | Type | Description |
|---|---|---|
options |
Object |
可选的选项对象,其属性将被设置到实例。option 具体配置项继承自 |
Extends
WKTFormat
-> Format
Members
-
dataObject
-
当 keepData 属性设置为 true,这是传递给 read 操作的要被解析的字符串。
-
keepDataObject
-
保持最近读到的数据的引用(通过 data 属性)。
Methods
-
inherited destroy()
common/format/Format.js, line 38 -
销毁该格式类,释放相关资源。
-
extractGeometry(geometry){string}
common/format/WKT.js, line 334 -
为单个 Geometry 对象构造 WKT 的入口点。
Name Type Description geometryGeometry Geometry 对象。
Returns:
Type Description string 表示几何的 WKT 字符串。 -
read(wkt){FeatureVector|Array}
common/format/WKT.js, line 281 -
反序列化 WKT 字符串并返回向量特征或向量特征数组。支持 POINT、MULTIPOINT、LINESTRING、MULTILINESTRING、POLYGON、MULTIPOLYGON 和 GEOMETRYCOLLECTION 的 WKT。
Name Type Description wktstring WKT 字符串。
Returns:
Type Description FeatureVector | Array GEOMETRYCOLLECTION WKT 的矢量要素或者矢量要素数组。 -
write(features){string}
common/format/WKT.js, line 302 -
将矢量要素或矢量要素数组序列化为 WKT 字符串。
Name Type Description featuresFeatureVector | Array 矢量要素或矢量要素数组。
Returns:
Type Description string 表示几何的 WKT 字符串。