Просмотр исходного кода

improve the viewer params

tags/2.2.3
Caven Chen 4 лет назад
Родитель
Сommit
179d345992
1 измененных файлов: 2 добавлений и 2 удалений
  1. 2
    2
      modules/viewer/Viewer.js

+ 2
- 2
modules/viewer/Viewer.js Просмотреть файл



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


this._dcContainer = DomUtil.create( this._dcContainer = DomUtil.create(
'div', 'div',
'dc-container', 'dc-container',
document.getElementById(id)
typeof id === 'string' ? document.getElementById(id) : id
) //Register the custom container ) //Register the custom container


this._baseLayerPicker = new Cesium.BaseLayerPickerViewModel({ this._baseLayerPicker = new Cesium.BaseLayerPickerViewModel({

Загрузка…
Отмена
Сохранить