map-ol-utils 0.0.45 → 0.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -165,14 +165,17 @@ var assembleGeoJson = (dataList, config) => {
165
165
  try {
166
166
  const pathArray = Array.isArray(item[key]) ? item[key] : JSON.parse(item[key] || "[]");
167
167
  if (pathArray.length) {
168
- tempList.push({
169
- type: "Feature",
170
- properties: __spreadValues({}, item),
171
- geometry: {
172
- coordinates: pathArray,
173
- type: determineGeometryType(pathArray)
174
- }
175
- });
168
+ const type = determineGeometryType(pathArray);
169
+ if (type !== "Invalid" /* Invalid */) {
170
+ tempList.push({
171
+ type: "Feature",
172
+ properties: __spreadValues({}, item),
173
+ geometry: {
174
+ type,
175
+ coordinates: pathArray
176
+ }
177
+ });
178
+ }
176
179
  }
177
180
  } catch (e) {
178
181
  console.error(`\u521B\u5EFA\u7EBF\u72B6\u6570\u636E\u5931\u8D25\uFF1A${e}`);
package/dist/index.js CHANGED
@@ -107,14 +107,17 @@ var assembleGeoJson = (dataList, config) => {
107
107
  try {
108
108
  const pathArray = Array.isArray(item[key]) ? item[key] : JSON.parse(item[key] || "[]");
109
109
  if (pathArray.length) {
110
- tempList.push({
111
- type: "Feature",
112
- properties: __spreadValues({}, item),
113
- geometry: {
114
- coordinates: pathArray,
115
- type: determineGeometryType(pathArray)
116
- }
117
- });
110
+ const type = determineGeometryType(pathArray);
111
+ if (type !== "Invalid" /* Invalid */) {
112
+ tempList.push({
113
+ type: "Feature",
114
+ properties: __spreadValues({}, item),
115
+ geometry: {
116
+ type,
117
+ coordinates: pathArray
118
+ }
119
+ });
120
+ }
118
121
  }
119
122
  } catch (e) {
120
123
  console.error(`\u521B\u5EFA\u7EBF\u72B6\u6570\u636E\u5931\u8D25\uFF1A${e}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "map-ol-utils",
3
- "version": "0.0.45",
3
+ "version": "0.0.46",
4
4
  "type": "module",
5
5
  "description": "Openlayers utils library",
6
6
  "files": [