map-ol-utils 0.1.16 → 0.1.17
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 -3
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +18 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -419,7 +419,7 @@ var buildMassMarksStyles = (getImgUrlFn) => {
|
|
|
419
419
|
});
|
|
420
420
|
const activeImage = getMarkerUrl(`${markerIcon}-${i}-active`, ".webp");
|
|
421
421
|
massMarksStyles[i + statusNum] = new import_style.Style({
|
|
422
|
-
zIndex:
|
|
422
|
+
zIndex: 120,
|
|
423
423
|
image: new import_style.Icon({
|
|
424
424
|
width: x * activeScale,
|
|
425
425
|
height: y * activeScale,
|
|
@@ -552,11 +552,12 @@ var addMassMarksLayer = (getImgUrlFn) => {
|
|
|
552
552
|
isAutoFit,
|
|
553
553
|
statusNum,
|
|
554
554
|
markerIcon,
|
|
555
|
+
marksStyles,
|
|
555
556
|
markerSize,
|
|
556
557
|
activeScale,
|
|
557
558
|
vectorConfig
|
|
558
559
|
} = iconConfig;
|
|
559
|
-
const massMarksStyles = buildMassMarksStyles(getImgUrlFn)({
|
|
560
|
+
const massMarksStyles = marksStyles ? marksStyles : buildMassMarksStyles(getImgUrlFn)({
|
|
560
561
|
baseUrl,
|
|
561
562
|
markerIcon,
|
|
562
563
|
markerSize,
|
|
@@ -650,7 +651,14 @@ var createOverlay = (config = { id: "popup-container", positioning: "top-center"
|
|
|
650
651
|
var createClusterLayer = (dataList, config) => {
|
|
651
652
|
const count = dataList.length;
|
|
652
653
|
const styleCache = {};
|
|
653
|
-
const {
|
|
654
|
+
const {
|
|
655
|
+
distance,
|
|
656
|
+
minDistance,
|
|
657
|
+
openClick,
|
|
658
|
+
buildStyle,
|
|
659
|
+
singleStyles,
|
|
660
|
+
computedRadius
|
|
661
|
+
} = config;
|
|
654
662
|
const innerComputedRadius = (size) => Math.pow(size / count, 1 / 18);
|
|
655
663
|
styleCache[1] = singleStyles;
|
|
656
664
|
const innerBuildStyle = (feature) => {
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -70,7 +70,13 @@ import VectorSource from "ol/source/Vector";
|
|
|
70
70
|
import { Point } from "ol/geom";
|
|
71
71
|
import { singleClick } from "ol/events/condition";
|
|
72
72
|
import { boundingExtent, getCenter } from "ol/extent";
|
|
73
|
-
import {
|
|
73
|
+
import {
|
|
74
|
+
Icon,
|
|
75
|
+
Text,
|
|
76
|
+
Fill,
|
|
77
|
+
Style,
|
|
78
|
+
Stroke
|
|
79
|
+
} from "ol/style";
|
|
74
80
|
var removeOverlays = (key = "") => {
|
|
75
81
|
if (instance) {
|
|
76
82
|
const overlays = instance.getOverlays().getArray().filter((overlay) => overlay.get(key || "position"));
|
|
@@ -352,7 +358,7 @@ var buildMassMarksStyles = (getImgUrlFn) => {
|
|
|
352
358
|
});
|
|
353
359
|
const activeImage = getMarkerUrl(`${markerIcon}-${i}-active`, ".webp");
|
|
354
360
|
massMarksStyles[i + statusNum] = new Style({
|
|
355
|
-
zIndex:
|
|
361
|
+
zIndex: 120,
|
|
356
362
|
image: new Icon({
|
|
357
363
|
width: x * activeScale,
|
|
358
364
|
height: y * activeScale,
|
|
@@ -485,11 +491,12 @@ var addMassMarksLayer = (getImgUrlFn) => {
|
|
|
485
491
|
isAutoFit,
|
|
486
492
|
statusNum,
|
|
487
493
|
markerIcon,
|
|
494
|
+
marksStyles,
|
|
488
495
|
markerSize,
|
|
489
496
|
activeScale,
|
|
490
497
|
vectorConfig
|
|
491
498
|
} = iconConfig;
|
|
492
|
-
const massMarksStyles = buildMassMarksStyles(getImgUrlFn)({
|
|
499
|
+
const massMarksStyles = marksStyles ? marksStyles : buildMassMarksStyles(getImgUrlFn)({
|
|
493
500
|
baseUrl,
|
|
494
501
|
markerIcon,
|
|
495
502
|
markerSize,
|
|
@@ -583,7 +590,14 @@ var createOverlay = (config = { id: "popup-container", positioning: "top-center"
|
|
|
583
590
|
var createClusterLayer = (dataList, config) => {
|
|
584
591
|
const count = dataList.length;
|
|
585
592
|
const styleCache = {};
|
|
586
|
-
const {
|
|
593
|
+
const {
|
|
594
|
+
distance,
|
|
595
|
+
minDistance,
|
|
596
|
+
openClick,
|
|
597
|
+
buildStyle,
|
|
598
|
+
singleStyles,
|
|
599
|
+
computedRadius
|
|
600
|
+
} = config;
|
|
587
601
|
const innerComputedRadius = (size) => Math.pow(size / count, 1 / 18);
|
|
588
602
|
styleCache[1] = singleStyles;
|
|
589
603
|
const innerBuildStyle = (feature) => {
|