hookehuyr

fix 文字修改

<!--
* @Date: 2025-01-22 11:40:12
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-02-08 16:15:04
* @LastEditTime: 2025-02-08 17:37:19
* @FilePath: /map-demo/src/views/mapCutter.vue
* @Description: 文件描述
-->
......@@ -17,7 +17,7 @@
</div> -->
<div style="display: flex; padding: 1rem; gap: 1rem;">
<div style="display: flex; align-items: center;">
<div>目标地图经纬度:&nbsp;</div>
<div>地图中心坐标:&nbsp;</div>
<el-input
v-model="map_center"
style="width: 240px"
......@@ -27,7 +27,7 @@
</div>
<div style="display: flex; align-items: center;">
<div>地图层级:&nbsp;</div>
<el-select v-model="map_zoom" placeholder="地图层级" style="width: 240px" @change="onZoomChange">
<el-select v-model="map_zoom" placeholder="地图层级" style="width: 80px" @change="onZoomChange">
<el-option
v-for="item in zoom_options"
:key="item.value"
......@@ -38,7 +38,7 @@
</div>
<div style="display: flex; align-items: center;">
<div>上传图片基点:&nbsp;</div>
<div>上传图片左下角坐标:&nbsp;</div>
<el-input
v-model="map_left_bottom_range"
style="width: 240px"
......@@ -52,11 +52,11 @@
placeholder="输入右上角的经纬度"
@blur="onRTRangeBlur"
/> -->
<div>上传图片比例:&nbsp;</div>
<div>上传图片缩放比例:&nbsp;</div>
<el-input
v-model="img_ratio"
style="width: 240px"
placeholder="输入上传图片比例"
placeholder="输入比例"
@blur="onRatioBlur"
>
</el-input>
......@@ -83,7 +83,7 @@
<el-button type="primary" @click="rotateMap(-10)">地图逆时针旋转</el-button>
</div> -->
<div v-if="log_lnglat" style="position: fixed; top: 5rem; left: 1rem; color: black; background-color: white; padding: 1rem;">
<div v-if="log_lnglat" style="position: fixed; top: 8rem; left: 1rem; color: black; background-color: white; padding: 1rem;">
<div style=" display: flex; align-items: center; justify-content: center;">经纬度:{{ log_lnglat }}&nbsp;&nbsp;&nbsp;<el-button @click="copyText(log_lnglat)" type="primary" :icon="Brush" size="small">复制</el-button></div>
</div>
......@@ -367,20 +367,20 @@ imageLayer.value.setBounds(bounds.value);
// ✅ 2. 缩放图片
const scaleImage = (factor) => {
const sw = bounds.value.getSouthWest();
const ne = bounds.value.getNorthEast();
const sw = bounds.value.getSouthWest();
const ne = bounds.value.getNorthEast();
const centerX = (sw.lng + ne.lng) / 2;
const centerY = (sw.lat + ne.lat) / 2;
const newWidth = (ne.lng - sw.lng) * factor;
const newHeight = (ne.lat - sw.lat) * factor;
const centerX = (sw.lng + ne.lng) / 2;
const centerY = (sw.lat + ne.lat) / 2;
const newWidth = (ne.lng - sw.lng) * factor;
const newHeight = (ne.lat - sw.lat) * factor;
bounds.value = new AMap.Bounds(
[centerX - newWidth / 2, centerY - newHeight / 2],
[centerX + newWidth / 2, centerY + newHeight / 2]
);
bounds.value = new AMap.Bounds(
[centerX - newWidth / 2, centerY - newHeight / 2],
[centerX + newWidth / 2, centerY + newHeight / 2]
);
imageLayer.value.setBounds(bounds.value);
imageLayer.value.setBounds(bounds.value);
};
// 旋转地图
......@@ -531,7 +531,7 @@ const onRatioBlur = () => {
.controls-container {
position: absolute;
top: 5rem;
top: 8rem;
right: 10px;
display: flex;
flex-direction: column;
......