Skip to content

Commit 0f13d07

Browse files
author
潘卓然ParnDeedlit
committed
【SDK】【修复】【统改三维矢量瓦片的参数&修复M3D的options传参方式】
1 parent 9dcdca6 commit 0f13d07

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/cesiumjs/layer/M3DLayer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export default class M3DLayer extends BaseLayer {
115115
let proxy;
116116
const docLayers = [];
117117

118-
const layersString = defaultValue(op.layers, '');
118+
const layersString = Cesium.defaultValue(options.layers, '');
119119

120120
let layersVec = layersString.split('=');
121121

src/cesiumjs/render/VectorTileLayer.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { find } from 'ol/array';
1616
* @param {String} [option.ip = localhost] 地图服务ip
1717
* @param {String} [option.port = 6163] 地图服务port
1818
* @param {String} [option.layerName] 地图名
19-
* @param {String} option.style 样式json文件路径或者MVT-JSON对象,当为url时等于styleUrl;当为vectortilejson等于vectortilejson
19+
* @param {String} option.mvtStyle 样式json文件路径或者MVT-JSON对象,当为url时等于styleUrl;当为vectortilejson等于vectortilejson
2020
* @param {String} [option.styleUrl] 样式json文件路径,有styleUrl就可以直接读取styleUrl里的信息;不然就是加载中地发布的矢量瓦片,使用ip,port和layerName先拼接styleUrl路径再进行查询。
2121
* @param {Object} [option.vectortilejson] 矢量瓦片json对象,直接取json对象,不需要再去请求。
2222
* @param {Cesium.TilingScheme} [option.tilingScheme] 矢量瓦片瓦片切分规则:经纬度还是墨卡托
@@ -27,7 +27,7 @@ import { find } from 'ol/array';
2727
* vectortileLayer = new CesiumZondy.Overlayer.VectorTileLayer(
2828
webGlobe.viewer,
2929
{
30-
style:"http://develop.smaryun.com:6163/igs/rest/mrms/vtiles/styles/街道-墨卡托.json",
30+
mvtStyle:"http://develop.smaryun.com:6163/igs/rest/mrms/vtiles/styles/街道-墨卡托.json",
3131
token: "",
3232
show: true,
3333
}
@@ -50,21 +50,21 @@ export class VectorTileLayer {
5050
this.vectortilejson = options.vectortilejson;
5151
this.threadId = options.threadId || Math.random() * 10000;
5252
this.show = options.show;
53-
this.style = options.style;
53+
this.mvtStyle = options.mvtStyle;
5454
this.styleUrl = options.styleUrl;
5555
this.tilingScheme = options.tilingScheme;
5656
this.provider = null;
5757

5858
this.initDevicePixelRatio();
5959
//this.bindEvent();
6060

61-
if (this.style) {
62-
if (typeof this.style === 'string') {
61+
if (this.mvtStyle) {
62+
if (typeof this.mvtStyle === 'string') {
6363
//如果是个网络地址,就通过url请求获取矢量瓦片json对象
64-
this.url = this.style;
64+
this.url = this.mvtStyle;
6565
this.requestVectortileJson();
6666
} else {
67-
this.requestStyleData(this.style);
67+
this.requestStyleData(this.mvtStyle);
6868
}
6969
} else if (this.styleUrl) {
7070
if (typeof this.styleUrl === 'string') {

0 commit comments

Comments
 (0)