| 
                        123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 | 
                        - /**
 -  * @Author: Caven
 -  * @Date: 2020-01-21 15:54:56
 -  */
 - 
 - import TerrainType from './TerrainType'
 - 
 - const { Cesium } = DC.Namespace
 - 
 - class TerrainFactory {
 -   /**
 -    * Create ellipsoid terrain
 -    * @param options
 -    * @returns {module:cesium.EllipsoidTerrainProvider}
 -    */
 -   static createEllipsoidTerrain(options) {
 -     return new Cesium.EllipsoidTerrainProvider(options)
 -   }
 - 
 -   /**
 -    * Create url terrain
 -    * @param options
 -    * @returns {module:cesium.CesiumTerrainProvider}
 -    */
 -   static createUrlTerrain(options) {
 -     return new Cesium.CesiumTerrainProvider(options)
 -   }
 - 
 -   /**
 -    * Create google terrain
 -    * @param options
 -    * @returns {module:cesium.GoogleEarthEnterpriseTerrainProvider}
 -    */
 -   static createGoogleTerrain(options) {
 -     return new Cesium.GoogleEarthEnterpriseTerrainProvider(options)
 -   }
 - 
 -   /**
 -    * Create arcgis terrain
 -    * @param options
 -    * @returns {module:cesium.ArcGISTiledElevationTerrainProvider}
 -    */
 -   static createArcgisTerrain(options) {
 -     return new Cesium.ArcGISTiledElevationTerrainProvider(options)
 -   }
 - 
 -   /**
 -    * Create vr terrain
 -    * @param options
 -    * @returns {module:cesium.VRTheWorldTerrainProvider}
 -    */
 -   static createVRTerrain(options) {
 -     return new Cesium.VRTheWorldTerrainProvider(options)
 -   }
 - 
 -   /**
 -    * Create Terrain
 -    * @param type
 -    * @param options
 -    * @returns {any}
 -    */
 -   static createTerrain(type, options) {
 -     let terrain = undefined
 -     switch (type) {
 -       case TerrainType.NONE:
 -         terrain = this.createEllipsoidTerrain(options)
 -         break
 -       case TerrainType.XYZ:
 -         terrain = this.createUrlTerrain(options)
 -         break
 -       case TerrainType.GOOGLE:
 -         terrain = this.createGoogleTerrain(options)
 -         break
 -       case TerrainType.ARCGIS:
 -         terrain = this.createArcgisTerrain(options)
 -         break
 -       case TerrainType.VR:
 -         terrain = this.createVRTerrain(options)
 -         break
 -       default:
 -         break
 -     }
 -     return terrain
 -   }
 - }
 - 
 - export default TerrainFactory
 
 
  |