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:44:44 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9f17e6d179d404a1df97f312653a97dffa8ef661
9f17e6d1
1 parent
b8649935
fix 切图名称修改-Bob需求
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
src/utils/TileCutter.js
src/utils/TileCutter.js
View file @
9f17e6d
/*
* @Date: 2025-01-22 11:45:30
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-02-2
4 17:15:58
* @LastEditTime: 2025-02-2
7 09:41:24
* @FilePath: /map-demo/src/utils/TileCutter.js
* @Description: 文件描述
*/
...
...
@@ -107,7 +107,7 @@ function sliceImageToTiles(image, bounds, zoomLevel) {
const
beijingTime
=
dayjs
().
add
(
8
,
"hour"
).
toDate
();
// 使用 JSZip 将每个瓦片添加到压缩包中
zip
.
file
(
`
${
tileX
}
_
${
tileY
}
_
${
zoomLevel
}
.png`
,
blob
,
{
date
:
beijingTime
});
zip
.
file
(
`
${
tileX
}
-
${
tileY
}
.png`
,
blob
,
{
date
:
beijingTime
});
tileIndex
++
;
// 如果所有瓦片都处理完,生成并下载压缩包
...
...
Please
register
or
login
to post a comment