ソースを参照

improve the viewer params

tags/2.2.3
Caven Chen 4年前
コミット
179d345992
1個のファイルの変更2行の追加2行の削除
  1. 2
    2
      modules/viewer/Viewer.js

+ 2
- 2
modules/viewer/Viewer.js ファイルの表示

@@ -36,7 +36,7 @@ const DEF_OPTS = {

class Viewer {
constructor(id, options = {}) {
if (!id || !document.getElementById(id)) {
if (!id || (typeof id === 'string' && !document.getElementById(id))) {
throw new Error('Viewer:the id is empty')
}

@@ -58,7 +58,7 @@ class Viewer {
this._dcContainer = DomUtil.create(
'div',
'dc-container',
document.getElementById(id)
typeof id === 'string' ? document.getElementById(id) : id
) //Register the custom container

this._baseLayerPicker = new Cesium.BaseLayerPickerViewModel({

読み込み中…
キャンセル
保存