@@ -35,7 +35,7 @@ export class TileTMS {
35
35
}
36
36
calcTiles ( ) {
37
37
// 当前绝对路径
38
- const downloadPath = this . rootPath + '\\ ' ;
38
+ const downloadPath = this . rootPath + '/ ' ;
39
39
40
40
// 下载范围
41
41
const zmin = this . minZoom ;
@@ -60,12 +60,12 @@ export class TileTMS {
60
60
if ( minLat < 0 ) minLat = 0 ;
61
61
const maxLat = Math . max ( bottom_tile , top_tile ) ;
62
62
for ( let x = minLong ; x < maxLong ; x ++ ) {
63
- const temppath = downloadPath + z + '\\ ' + x ;
63
+ const temppath = downloadPath + z + '/ ' + x ;
64
64
this . apiEnsureDirSync ( temppath ) ;
65
65
for ( let y = minLat ; y < maxLat ; y ++ ) {
66
66
// const str3 = baseUrl.replace('{z}', z).replace('{x}', x).replace('{y}', y);
67
67
const str3 = this . tileLayer . getTileUrl ( x , y , z ) ;
68
- const path2 = temppath + '\\ ' + y + pictureType ;
68
+ const path2 = temppath + '/ ' + y + pictureType ;
69
69
list . push ( { zoom : z , url :str3 , savePath :path2 } ) ;
70
70
}
71
71
}
@@ -96,7 +96,7 @@ export class TileTMSList {
96
96
}
97
97
calcTiles ( subpath , layer ) {
98
98
// 当前绝对路径
99
- const downloadPath = this . rootPath + '\\ ' + subpath + '\\ ' ;
99
+ const downloadPath = this . rootPath + '/ ' + subpath + '/ ' ;
100
100
101
101
// 下载范围
102
102
const zmin = this . minZoom ;
@@ -120,11 +120,11 @@ export class TileTMSList {
120
120
if ( minLat < 0 ) minLat = 0 ;
121
121
const maxLat = Math . max ( bottom_tile , top_tile ) ;
122
122
for ( let x = minLong ; x < maxLong ; x ++ ) {
123
- const temppath = downloadPath + z + '\\ ' + x ;
123
+ const temppath = downloadPath + z + '/ ' + x ;
124
124
this . apiEnsureDirSync ( temppath ) ;
125
125
for ( let y = minLat ; y < maxLat ; y ++ ) {
126
126
const str3 = layer . getTileUrl ( x , y , z ) ;
127
- const path2 = temppath + '\\ ' + y + pictureType ;
127
+ const path2 = temppath + '/ ' + y + pictureType ;
128
128
list . push ( { zoom : z , url :str3 , savePath :path2 } ) ;
129
129
}
130
130
}
@@ -151,7 +151,7 @@ export class TileTMSList {
151
151
}
152
152
calcTiles ( layers ) {
153
153
// 当前绝对路径
154
- const downloadPath = this . rootPath + '\\ ' ;
154
+ const downloadPath = this . rootPath + '/ ' ;
155
155
156
156
// 下载范围
157
157
const zmin = this . minZoom ;
@@ -175,11 +175,11 @@ export class TileTMSList {
175
175
if ( minLat < 0 ) minLat = 0 ;
176
176
const maxLat = Math . max ( bottom_tile , top_tile ) ;
177
177
for ( let x = minLong ; x < maxLong ; x ++ ) {
178
- const temppath = downloadPath + z + '\\ ' + x ;
178
+ const temppath = downloadPath + z + '/ ' + x ;
179
179
this . apiEnsureDirSync ( temppath ) ;
180
180
for ( let y = minLat ; y < maxLat ; y ++ ) {
181
181
const str3 = layers . map ( ll => { return { url : ll . getTileUrl ( x , y , z ) , isLabel : ll . config ( ) . style . includes ( '_Label' ) } ; } ) ;
182
- const path2 = temppath + '\\ ' + y + pictureType ;
182
+ const path2 = temppath + '/ ' + y + pictureType ;
183
183
list . push ( { zoom : z , layers :str3 , savePath :path2 } ) ;
184
184
}
185
185
}
0 commit comments