Procházet zdrojové kódy

add terrain name options

tags/2.6.1
duanhuyin před 4 roky
rodič
revize
bf7ca29024
1 změnil soubory, kde provedl 2 přidání a 3 odebrání
  1. 2
    3
      modules/viewer/Viewer.js

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

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

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