Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
map-demo
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-02-27 09:27:41 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5a21bd0a714e77e3913f20a09d4b88c8c3ad2d02
5a21bd0a
1 parent
d1e55696
fix Bob需求调整
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
15 deletions
src/views/mapCutter.vue
src/views/mapCutter.vue
View file @
5a21bd0
<!--
* @Date: 2025-01-22 11:40:12
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-02-2
6 17:41:37
* @LastEditTime: 2025-02-2
7 09:25:30
* @FilePath: /map-demo/src/views/mapCutter.vue
* @Description: 文件描述
-->
...
...
@@ -25,17 +25,6 @@
@blur="onCenterBlur"
/>
</div>
<div style="display: flex; align-items: center;">
<div>地图层级: </div>
<el-select v-model="map_zoom" placeholder="地图层级" style="width: 80px" @change="onZoomChange">
<el-option
v-for="item in zoom_options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
<div style="display: flex; align-items: center;">
<div>上传图片左下角坐标: </div>
...
...
@@ -61,6 +50,19 @@
>
</el-input> -->
</div>
<div style="display: flex; align-items: center;">
<div>地图层级: </div>
<el-select v-model="map_zoom" placeholder="地图层级" style="width: 80px" @change="onZoomChange">
<el-option
v-for="item in zoom_options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
<div v-if="showUpload">
<!-- 触发上传按钮 -->
<el-button type="primary" @click="triggerFileInput">上传图片</el-button>
...
...
@@ -203,12 +205,12 @@ const handleKeydown = (e) => { // 键盘控制
}
onMounted(async () => {
loadMap();
window.addEventListener('keydown', handleKeydown)
// 地图中心点
const code = $route.query.id;
const { data } = await mapAPI({ i: code });
map_center.value = data.map.center.map(item => Number(item));
loadMap();
window.addEventListener('keydown', handleKeydown)
});
onBeforeUnmount(() => {
...
...
@@ -364,7 +366,7 @@ function cutTiles() {
// ✅ 1. 位置移动
const moveImage = (direction) => {
const offset = 0.000
1
; // 移动步长(经纬度差值)
const offset = 0.000
002
; // 移动步长(经纬度差值)
const sw = bounds.value.getSouthWest();
const ne = bounds.value.getNorthEast();
...
...
Please
register
or
login
to post a comment