map-ol-utils 0.0.22 → 0.0.23

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
@@ -160,6 +160,7 @@ var import_View = __toESM(require("ol/View"), 1);
160
160
  var import_control = require("ol/control");
161
161
 
162
162
  // src/layer-utils.ts
163
+ var import_gcoord = __toESM(require("gcoord"), 1);
163
164
  var import_geom = require("ol/geom");
164
165
  var import_format2 = require("ol/format");
165
166
  var import_ol = require("ol");
@@ -220,7 +221,7 @@ var assembleGeoJson = (dataList, config) => {
220
221
  console.error(`\u521B\u5EFA\u7EBF\u72B6\u6570\u636E\u5931\u8D25\uFF1A${e}`);
221
222
  }
222
223
  });
223
- return { type: "FeatureCollection", features: tempList };
224
+ return import_gcoord.default.transform({ type: "FeatureCollection", features: tempList }, import_gcoord.default.GCJ02, import_gcoord.default.WGS84);
224
225
  };
225
226
  var createVectorStyle = (data, config) => {
226
227
  const { isLine, colorMap, fillColor, colorKey, strokeColor, strokeWeight } = config || {};
package/dist/index.js CHANGED
@@ -105,6 +105,7 @@ import View from "ol/View";
105
105
  import { defaults } from "ol/control";
106
106
 
107
107
  // src/layer-utils.ts
108
+ import gcoord from "gcoord";
108
109
  import { Point } from "ol/geom";
109
110
  import { GeoJSON } from "ol/format";
110
111
  import { Feature, Overlay } from "ol";
@@ -165,7 +166,7 @@ var assembleGeoJson = (dataList, config) => {
165
166
  console.error(`\u521B\u5EFA\u7EBF\u72B6\u6570\u636E\u5931\u8D25\uFF1A${e}`);
166
167
  }
167
168
  });
168
- return { type: "FeatureCollection", features: tempList };
169
+ return gcoord.transform({ type: "FeatureCollection", features: tempList }, gcoord.GCJ02, gcoord.WGS84);
169
170
  };
170
171
  var createVectorStyle = (data, config) => {
171
172
  const { isLine, colorMap, fillColor, colorKey, strokeColor, strokeWeight } = config || {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "map-ol-utils",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "type": "module",
5
5
  "description": "Openlayers utils library",
6
6
  "files": [
@@ -27,11 +27,9 @@
27
27
  "dependencies": {
28
28
  "ol": "^10.5.0",
29
29
  "mitt": "^3.0.1",
30
- "proj4": "^2.15.0"
31
- },
32
- "devDependencies": {
33
- "@types/proj4": "^2.5.6"
30
+ "gcoord": "^1.0.7"
34
31
  },
32
+ "devDependencies": {},
35
33
  "peerDependencies": {
36
34
  "ol": ">=10.5.0"
37
35
  },