map-ol-utils 0.0.45 → 0.0.47

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
@@ -145,7 +145,11 @@ var createAnimationMarker = (imgUrl, data) => {
145
145
  element,
146
146
  stopEvent: false,
147
147
  positioning: "bottom-center",
148
- position: import_gcoord.default.transform([+lnglat[0], +lnglat[1]], crsForm || import_gcoord.default.WGS84, import_gcoord.default.WGS84)
148
+ position: import_gcoord.default.transform(
149
+ [+lnglat[0], +lnglat[1]],
150
+ crsForm || import_gcoord.default.WGS84,
151
+ import_gcoord.default.WGS84
152
+ )
149
153
  });
150
154
  overlay.set("_isAnimationMarker", true);
151
155
  instance.addOverlay(overlay);
@@ -165,14 +169,17 @@ var assembleGeoJson = (dataList, config) => {
165
169
  try {
166
170
  const pathArray = Array.isArray(item[key]) ? item[key] : JSON.parse(item[key] || "[]");
167
171
  if (pathArray.length) {
168
- tempList.push({
169
- type: "Feature",
170
- properties: __spreadValues({}, item),
171
- geometry: {
172
- coordinates: pathArray,
173
- type: determineGeometryType(pathArray)
174
- }
175
- });
172
+ const type = determineGeometryType(pathArray);
173
+ if (type !== "Invalid" /* Invalid */) {
174
+ tempList.push({
175
+ type: "Feature",
176
+ properties: __spreadValues({}, item),
177
+ geometry: {
178
+ type,
179
+ coordinates: pathArray
180
+ }
181
+ });
182
+ }
176
183
  }
177
184
  } catch (e) {
178
185
  console.error(`\u521B\u5EFA\u7EBF\u72B6\u6570\u636E\u5931\u8D25\uFF1A${e}`);
@@ -486,14 +493,15 @@ var addMassMarksLayer = (getImgUrlFn) => {
486
493
  statusNum,
487
494
  markerIcon,
488
495
  markerSize,
496
+ activeScale,
489
497
  vectorConfig
490
498
  } = iconConfig;
491
499
  const massMarksStyles = buildMassMarksStyles(getImgUrlFn)({
492
500
  baseUrl,
493
501
  markerIcon,
494
502
  markerSize,
495
- activeScale: 1.3,
496
- statusNum: statusNum || 5
503
+ statusNum: statusNum || 5,
504
+ activeScale: activeScale || 1.3
497
505
  });
498
506
  const massMarksLayer = createMassMarksLayer(dataList, massMarksStyles);
499
507
  if (openClick) {
package/dist/index.js CHANGED
@@ -87,7 +87,11 @@ var createAnimationMarker = (imgUrl, data) => {
87
87
  element,
88
88
  stopEvent: false,
89
89
  positioning: "bottom-center",
90
- position: gcoord.transform([+lnglat[0], +lnglat[1]], crsForm || gcoord.WGS84, gcoord.WGS84)
90
+ position: gcoord.transform(
91
+ [+lnglat[0], +lnglat[1]],
92
+ crsForm || gcoord.WGS84,
93
+ gcoord.WGS84
94
+ )
91
95
  });
92
96
  overlay.set("_isAnimationMarker", true);
93
97
  instance.addOverlay(overlay);
@@ -107,14 +111,17 @@ var assembleGeoJson = (dataList, config) => {
107
111
  try {
108
112
  const pathArray = Array.isArray(item[key]) ? item[key] : JSON.parse(item[key] || "[]");
109
113
  if (pathArray.length) {
110
- tempList.push({
111
- type: "Feature",
112
- properties: __spreadValues({}, item),
113
- geometry: {
114
- coordinates: pathArray,
115
- type: determineGeometryType(pathArray)
116
- }
117
- });
114
+ const type = determineGeometryType(pathArray);
115
+ if (type !== "Invalid" /* Invalid */) {
116
+ tempList.push({
117
+ type: "Feature",
118
+ properties: __spreadValues({}, item),
119
+ geometry: {
120
+ type,
121
+ coordinates: pathArray
122
+ }
123
+ });
124
+ }
118
125
  }
119
126
  } catch (e) {
120
127
  console.error(`\u521B\u5EFA\u7EBF\u72B6\u6570\u636E\u5931\u8D25\uFF1A${e}`);
@@ -428,14 +435,15 @@ var addMassMarksLayer = (getImgUrlFn) => {
428
435
  statusNum,
429
436
  markerIcon,
430
437
  markerSize,
438
+ activeScale,
431
439
  vectorConfig
432
440
  } = iconConfig;
433
441
  const massMarksStyles = buildMassMarksStyles(getImgUrlFn)({
434
442
  baseUrl,
435
443
  markerIcon,
436
444
  markerSize,
437
- activeScale: 1.3,
438
- statusNum: statusNum || 5
445
+ statusNum: statusNum || 5,
446
+ activeScale: activeScale || 1.3
439
447
  });
440
448
  const massMarksLayer = createMassMarksLayer(dataList, massMarksStyles);
441
449
  if (openClick) {
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.47",
4
4
  "type": "module",
5
5
  "description": "Openlayers utils library",
6
6
  "files": [