raintee-maputils 1.0.49 → 1.0.51
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/css/ruler/index.css +9 -9
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/package.json +37 -37
package/css/ruler/index.css
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
.mapbox-ctrl-ruler button {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
color: #333;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.mapbox-ctrl-ruler button.-active {
|
|
9
|
-
color: #4264fb;
|
|
1
|
+
.mapbox-ctrl-ruler button {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
color: #333;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.mapbox-ctrl-ruler button.-active {
|
|
9
|
+
color: #4264fb;
|
|
10
10
|
}
|
package/dist/index.js
CHANGED
|
@@ -5740,7 +5740,7 @@ const RT_FitBoundsMapboxNative = (map, featureCollection) => {
|
|
|
5740
5740
|
// ✅ 调用 Mapbox 的 fitBounds
|
|
5741
5741
|
map.fitBounds(bounds, {
|
|
5742
5742
|
padding: 50, // 可选:边距(单位像素)
|
|
5743
|
-
maxZoom:
|
|
5743
|
+
maxZoom: 18, // 可选:最大缩放级别,避免太近
|
|
5744
5744
|
duration: 1000, // 可选:动画时长(毫秒)
|
|
5745
5745
|
});
|
|
5746
5746
|
|
|
@@ -6505,7 +6505,7 @@ class RulerControl {
|
|
|
6505
6505
|
this.removeDragEvents = null;
|
|
6506
6506
|
if (!this.options.invisible) {
|
|
6507
6507
|
this.button = controlButton({
|
|
6508
|
-
title: options.title || 'Ruler',
|
|
6508
|
+
title: this.options.title || 'Ruler',
|
|
6509
6509
|
icon: icons.ruler(),
|
|
6510
6510
|
onClick: () => this.onControlButtonClick(),
|
|
6511
6511
|
});
|
|
@@ -7340,6 +7340,7 @@ class CustomSearchSelectControl {
|
|
|
7340
7340
|
onCancel: () => { },
|
|
7341
7341
|
placeholder: '搜索...',
|
|
7342
7342
|
title: '选择',
|
|
7343
|
+
cancelButtonText: '取消',
|
|
7343
7344
|
showSearch: true,
|
|
7344
7345
|
compactMode: true, // 新增:紧凑模式
|
|
7345
7346
|
maxHeight: '100vh', // 新增:最大高度
|
|
@@ -7642,7 +7643,7 @@ class CustomSearchSelectControl {
|
|
|
7642
7643
|
`;
|
|
7643
7644
|
|
|
7644
7645
|
const cancelBtn = document.createElement('button');
|
|
7645
|
-
cancelBtn.textContent =
|
|
7646
|
+
cancelBtn.textContent = this.options.cancelButtonText;
|
|
7646
7647
|
cancelBtn.className = 'vector-layer-cancel';
|
|
7647
7648
|
cancelBtn.style.cssText = `
|
|
7648
7649
|
padding: ${this._isMobile ? '6px 12px' : '6px 16px'};
|