Skip to content

Commit 49286b1

Browse files
committed
[#37]修改天地图域名错误问题
1 parent 6b700c3 commit 49286b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cesiumjs/layer/ThirdPartyLayer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export default class ThirdPartyLayer extends BaseLayer {
201201
if (!Cesium.defined(options.token)) {
202202
Cesium.deprecationWarning('http://www.tianditu.gov.cn', '请到天地图官网自行申请开发token,自带token仅做功能验证随时可能失效');
203203
}
204-
const url = 'http://t0.tianditu.gov.cn./DataServer?';
204+
const url = 'http://t0.tianditu.gov.cn/DataServer?';
205205
const row = '_c&X={x}&Y={y}&L={l}';
206206
switch (options.ptype) {
207207
case 'vec':
@@ -253,7 +253,7 @@ export default class ThirdPartyLayer extends BaseLayer {
253253
const options = Cesium.defaultValue(optionsParam, {});
254254
const token = Cesium.defaultValue(options.token, '9c157e9585486c02edf817d2ecbc7752');
255255
if (Cesium.defined(options.ptype)) {
256-
let url = `http://{s}.tianditu.gov.cn./{lw}/wmts?service=WMTS&version=1.0.0&request=GetTile&tilematrix={TileMatrix}&layer={layerType}&style={style}&tilerow={TileRow}&tilecol={TileCol}&tilematrixset=w&format=tiles&tk=${token}`;
256+
let url = `http://{s}.tianditu.gov.cn/{lw}/wmts?service=WMTS&version=1.0.0&request=GetTile&tilematrix={TileMatrix}&layer={layerType}&style={style}&tilerow={TileRow}&tilecol={TileCol}&tilematrixset=w&format=tiles&tk=${token}`;
257257
switch (options.ptype) {
258258
case 'img':
259259
url = url.replace('{lw}', 'img_w');

0 commit comments

Comments
 (0)