Explorar el Código

improve the viewer params

tags/2.2.3
Caven Chen hace 4 años
padre
commit
179d345992
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2
    2
      modules/viewer/Viewer.js

+ 2
- 2
modules/viewer/Viewer.js Ver fichero

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

Cargando…
Cancelar
Guardar