* @function GeoJSONFormat.prototype.fromGeoJSON * @version 9.1.1 * @description 将 GeoJSON 对象或者 GeoJSON 对象字符串转换为 SuperMap iServer Feature JSON。 * @param {GeoJSONObject} json - GeoJSON 对象。 * @param {string} [type='FeaureCollection'] - 可选的字符串,它决定了输出的格式。支持的值有:"Geometry","Feature",和 "
(json, type, filter)
| 532 | * @returns {Object} SuperMap iServer Feature JSON。 |
| 533 | */ |
| 534 | fromGeoJSON(json, type, filter) { |
| 535 | let feature = this.read(json, type, filter); |
| 536 | if (!Util.isArray(feature)) { |
| 537 | return this._toiSevrerFeature(feature); |
| 538 | } |
| 539 | return feature.map((element) => { |
| 540 | return this._toiSevrerFeature(element); |
| 541 | }) |
| 542 | } |
| 543 | |
| 544 | /** |
| 545 | * @function GeoJSONFormat.prototype.toGeoJSON |
no test coverage detected