Ver código fonte

Merge pull request #74 from mdxiaohu/master

add terrain name options
tags/2.6.1
Caven Chen 4 anos atrás
pai
commit
552bb970d9
Nenhuma conta vinculada ao e-mail do autor do commit
2 arquivos alterados com 2 adições e 2 exclusões
  1. 0
    0
      .babelrc
  2. 2
    2
      modules/viewer/Viewer.js

.babelrc → .babelrc Ver arquivo


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

@@ -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
}

Carregando…
Cancelar
Salvar