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 +11 -8
- package/dist/index.js +11 -8
- package/package.json +1 -1
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
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
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
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
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}`);
|