map-ol-utils 0.0.28 → 0.0.29
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 +2 -2
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -220,7 +220,7 @@ var resetActiveVector = () => {
|
|
|
220
220
|
});
|
|
221
221
|
};
|
|
222
222
|
var assembleGeoJson = (dataList, config) => {
|
|
223
|
-
const { key, isLine } = config;
|
|
223
|
+
const { key, isLine, needTransform = true } = config;
|
|
224
224
|
const tempList = [];
|
|
225
225
|
dataList.forEach((item) => {
|
|
226
226
|
try {
|
|
@@ -239,7 +239,7 @@ var assembleGeoJson = (dataList, config) => {
|
|
|
239
239
|
console.error(`\u521B\u5EFA\u7EBF\u72B6\u6570\u636E\u5931\u8D25\uFF1A${e}`);
|
|
240
240
|
}
|
|
241
241
|
});
|
|
242
|
-
return import_gcoord.default.transform({ type: "FeatureCollection", features: tempList }, import_gcoord.default.GCJ02, import_gcoord.default.WGS84);
|
|
242
|
+
return !needTransform ? { type: "FeatureCollection", features: tempList } : import_gcoord.default.transform({ type: "FeatureCollection", features: tempList }, import_gcoord.default.GCJ02, import_gcoord.default.WGS84);
|
|
243
243
|
};
|
|
244
244
|
var createVectorStyle = (data, config) => {
|
|
245
245
|
const { isLine, colorMap, fillColor, colorKey, strokeColor, strokeWeight, fillOpacity } = config || {};
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -165,7 +165,7 @@ var resetActiveVector = () => {
|
|
|
165
165
|
});
|
|
166
166
|
};
|
|
167
167
|
var assembleGeoJson = (dataList, config) => {
|
|
168
|
-
const { key, isLine } = config;
|
|
168
|
+
const { key, isLine, needTransform = true } = config;
|
|
169
169
|
const tempList = [];
|
|
170
170
|
dataList.forEach((item) => {
|
|
171
171
|
try {
|
|
@@ -184,7 +184,7 @@ var assembleGeoJson = (dataList, config) => {
|
|
|
184
184
|
console.error(`\u521B\u5EFA\u7EBF\u72B6\u6570\u636E\u5931\u8D25\uFF1A${e}`);
|
|
185
185
|
}
|
|
186
186
|
});
|
|
187
|
-
return gcoord.transform({ type: "FeatureCollection", features: tempList }, gcoord.GCJ02, gcoord.WGS84);
|
|
187
|
+
return !needTransform ? { type: "FeatureCollection", features: tempList } : gcoord.transform({ type: "FeatureCollection", features: tempList }, gcoord.GCJ02, gcoord.WGS84);
|
|
188
188
|
};
|
|
189
189
|
var createVectorStyle = (data, config) => {
|
|
190
190
|
const { isLine, colorMap, fillColor, colorKey, strokeColor, strokeWeight, fillOpacity } = config || {};
|