Procházet zdrojové kódy

improve the viewer params

tags/2.2.3
Caven Chen před 4 roky
rodič
revize
179d345992
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2
    2
      modules/viewer/Viewer.js

+ 2
- 2
modules/viewer/Viewer.js Zobrazit soubor

@@ -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({

Načítá se…
Zrušit
Uložit