Explorar el Código

Merge pull request #74 from mdxiaohu/master

add terrain name options
tags/2.6.1
Caven Chen hace 4 años
padre
commit
552bb970d9
No account linked to committer's email address
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 0
    0
      .babelrc
  2. 2
    2
      modules/viewer/Viewer.js

.babelrc → .babelrc Ver fichero


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

@@ -350,13 +350,13 @@ class Viewer {
* @param terrain
* @returns {Viewer}
*/
addTerrain(terrain) {
addTerrain(terrain, options = {}) {
if (!terrain) {
return this
}
this._baseLayerPicker.terrainProviderViewModels.push(
new Cesium.ProviderViewModel({
name: '地形',
name: options.name || '地形',
creationFunction: () => {
return terrain
}

Cargando…
Cancelar
Guardar