Explorar el Código

add terrain name options

tags/2.6.1
duanhuyin hace 4 años
padre
commit
bf7ca29024
Se han modificado 1 ficheros con 2 adiciones y 3 borrados
  1. 2
    3
      modules/viewer/Viewer.js

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

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

Cargando…
Cancelar
Guardar