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 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
@@ -32,6 +32,7 @@ type VectorConfig = {
32
32
  strokeColor?: string;
33
33
  strokeStyle?: string;
34
34
  strokeWeight?: number;
35
+ needTransform?: boolean;
35
36
  colorMap?: Map<string, string>;
36
37
  };
37
38
  type IconConfig = {
package/dist/index.d.ts CHANGED
@@ -32,6 +32,7 @@ type VectorConfig = {
32
32
  strokeColor?: string;
33
33
  strokeStyle?: string;
34
34
  strokeWeight?: number;
35
+ needTransform?: boolean;
35
36
  colorMap?: Map<string, string>;
36
37
  };
37
38
  type IconConfig = {
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 || {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "map-ol-utils",
3
- "version": "0.0.28",
3
+ "version": "0.0.29",
4
4
  "type": "module",
5
5
  "description": "Openlayers utils library",
6
6
  "files": [