MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / read

Method read

src/common/format/WKT.js:287–299  ·  view source on GitHub ↗

* @function WKTFormat.prototype.read * @description 反序列化 WKT 字符串并返回向量特征或向量特征数组。支持 POINT、MULTIPOINT、LINESTRING、MULTILINESTRING、POLYGON、MULTIPOLYGON 和 GEOMETRYCOLLECTION 的 WKT。 * @param {string} wkt - WKT 字符串。 * @returns {FeatureVector|Array} GEOMETRYCOLLECTION WKT 的矢量要素或者矢量要素数组。

(wkt)

Source from the content-addressed store, hash-verified

285 * @returns {FeatureVector|Array} GEOMETRYCOLLECTION WKT 的矢量要素或者矢量要素数组。
286 */
287 read(wkt) {
288 var features, type, str;
289 wkt = wkt.replace(/[\n\r]/g, " ");
290 var matches = this.regExes.typeStr.exec(wkt);
291 if (matches) {
292 type = matches[1].toLowerCase();
293 str = matches[2];
294 if (this.parse[type]) {
295 features = this.parse[type].apply(this, [str]);
296 }
297 }
298 return features;
299 }
300
301
302 /**

Callers 15

constructorMethod · 0.95
JSONSpec.jsFile · 0.45
GeoJSONSpec.jsFile · 0.45
WKTSpec.jsFile · 0.45
toSuperMapGeometryFunction · 0.45
toiClientFeatureMethod · 0.45
WebMap.jsFile · 0.45
toSuperMapGeometryFunction · 0.45
HeatMapLayer.jsFile · 0.45
ThemeLayer.jsFile · 0.45
ThemeFeature.jsFile · 0.45
toSuperMapGeometryFunction · 0.45

Calls 1

execMethod · 0.45

Tested by

no test coverage detected