- 
    
    
        
        staticYS.EarthEngine.clampToHeight(viewer, longitude, latitude) → XYZ
        
    
 
- 
    
    
        通过经纬度获取当前坐标处上方场景几何的的坐标,一般用于点坐标只有经纬度,但是不知道高度,却需要放在模型上时,可以用这个获取在场景上的坐标,获取坐标时不在视角范围内的值获取的可能是undefined
     
    
    
        
        | Name | Type | Description |  
            
                | viewer | Viewer | YouScene.earth.viewer |  
            
                | longitude | Number | 经度 |  
            
                | latitude | Number | 纬度 |  
 Returns:
    返回在场景上坐标
 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
 
- 
    
    
        
        staticYS.EarthEngine.clampToHeightMostDetailed(viewer, points) → Promise
        
    
 
- 
    
    
        通过经纬度获取一串坐标速组处上方场景几何的的坐标,可以用这个获取在场景上的坐标,异步方法,获取坐标时不在视角范围内的值获取的可能是undefined
     
    
    
        
        | Name | Type | Description |  
            
                | viewer | Viewer | YouScene.earth.viewer |  
            
                | points | Array.<XYZ> | 一组坐标数组 |  
 Returns:
    返回异步方法,结果是XYZ的速组,有的值可能是undefined,需要自己过滤
 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
 
- 
    
    
        
        staticYS.EarthEngine.generateCirclePoints(center, radius, count) → Array.<XY>
        
    
 
- 
    
    
        根据圆心坐标和半径,生成组成圆的点位坐标数组
     
    
    
        
        | Name | Type | Default | Description |  
            
                | center | XY
|
XYZ |  | 圆心坐标,单位度 |  
            
                | radius | Number |  | 圆的半径,单位度 |  
            
                | count | Number | 16 | optional
                
                
                
            
                组成圆的点的个数,请使用4的倍数 |  
 Returns:
    返回组成圆的点位坐标数组,长度和count一致,单位度
 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    - To Do:
- 
        
    
 
- 
    
    
        
        staticYS.EarthEngine.generateCirclePointsM(center, radius, count) → Array.<XYZ>
        
    
 
- 
    
    
        根据圆心坐标和半径,生成组成圆的点位坐标数组,
和generateCirclePoints的区别是圆半径单位是米
     
    
    
        
        | Name | Type | Default | Description |  
            
                | center | XYZ |  | 圆心坐标,单位度 |  
            
                | radius | Number |  | 圆的半径,单位米 |  
            
                | count | Number | 16 | optional
                
                
                
            
                组成圆的点的个数,请使用4的倍数 |  
 Returns:
    返回组成圆的点位坐标数组,长度和count一致,单位度
 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
 
- 
    
    
        
        staticYS.EarthEngine.getAllPicked(earth, windowPosition) → Array.<Feature>
        
    
 
- 
    
    
        根据屏幕坐标返回屏幕坐标下的数据对象
     
    
    
        
        | Name | Type | Description |  
            
                | earth | YSEarth | YouScene.earth |  
            
                | windowPosition | XY | 屏幕坐标 |  
 Returns:
    返回选中的所有对象
 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
 
- 
    
    
        
        staticYS.EarthEngine.getPickedByType(earth, windowPosition, type) → Array.<Feature>
        
    
 
- 
    
    
        根据屏幕坐标返回屏幕坐标下的数据对象
     Returns:
    返回选中的所有对象
 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
 
- 
    
    
        
        staticYS.EarthEngine.getTerrain(viewer, longitude, latitude) → Number
        
    
 
- 
    
    
        返回某点高程,同步方式
     
    
    
        
        | Name | Type | Description |  
            
                | viewer | Viewer | YouScene.earth.viewer |  
            
                | longitude | Number | 经度 |  
            
                | latitude | Number | 纬度 |  
 Returns:
    高程
 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
 
- 
    
    
        
        staticYS.EarthEngine.getTerrainLine(earth, options)
        
    
 
- 
    
    
        生成贴地线,异步方式
     
    
    
        
        | Name | Type | Description |  
            
                | earth | YSEarth | YouScene.earth |  
            
                | options | Object | 参数 
    
    
        
        | Name | Type | Default | Description |  
            
                | positions | Array.<XYZ> |  | 要生成贴地线的原始线段节点坐标 |  
            
                | offset | Number | 2.0 | optional
                
                
                
            
                贴地面向上偏移多少米 |  
            
                | granularity | Number |  | optional
                
                
                
            
                生成贴地线的步距 |  
            
                | calback | EarthEngine~getTerrainLinesCallback |  | optional
                
                
                
            
                生成贴地线后的回调函数,不设置将替换options.positions数组 |  |  
 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
 
- 
    
    
        
        staticYS.EarthEngine.getTerrainResolution(ys, level) → Number
        
    
 
- 
    
    
        计算地形瓦片的分辨率,不一定正确
     
    
    
        
        | Name | Type | Description |  
            
                | ys | YouScene | YouScene对象 |  
            
                | level | Number | DEM的级别 |  
 Returns:
    指定级别的DEM分辨率
 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
 
- 
    
    
        
        staticYS.EarthEngine.getTerrains(viewer, level, xyzArray, callback)
        
    
 
- 
    
    
        获取一组地形高度,异步方式
     
    
    
        
        | Name | Type | Description |  
            
                | viewer | Viewer | YouScene.earth.viewer |  
            
                | level | Number | 使用第几级的DEM获取高度 |  
            
                | xyzArray | Array.<XYZ> | 经纬度数组,地理坐标,单位度 |  
            
                | callback | EarthEngine~getTerrainsCallback | 获取成功后的回调函数 |  
 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    - To Do:
- 
        
    
 
- 
    
    
        
        staticYS.EarthEngine.getTerrainTile(viewer, xyz) → Object
        
    
 
- 
    
    
        通过坐标点获取地形瓦片
     
    
    
        
        | Name | Type | Description |  
            
                | viewer | Viewer | YouScene.earth.viewer |  
            
                | xyz | XYZ | 坐标,经纬度,单位度 |  
 Returns:
    切片
 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
 
- 
    
    
- 
    
    
        根据glsl中uniform的类型返回Cesium.WebGLConstants
     
    
    
        
        | Name | Type | Description |  
            
                | str | String | uniform的类型 |  
 Returns:
    返回cesium类型常量
 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
 
- 
    
    
        
        staticYS.EarthEngine.pickI3dOrGlobePosition(viewer, windowPosition) → Object
        
    
 
- 
    
    
        根据屏幕坐标发出射线,获取射线第一个经过的模型或场景或地面上的世界坐标和对象
     
    
    
        
        | Name | Type | Description |  
            
                | viewer | Viewer | youScene.earth.viewer |  
            
                | windowPosition | Cartesian2 | 屏幕坐标,左上角为{x: 0, y: 0} |  
 Returns:
    pickData 世界坐标坐标和经过的对象
 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
 
- 
    
    
        
        staticYS.EarthEngine.sampleHeight(viewer, longitude, latitude) → Number
        
    
 
- 
    
    
        通过经纬度获取当前坐标处上方场景几何的高度,一般用于点坐标只有经纬度,但是不知道高度,却需要放在模型上时,可以用这个获取高度
     
    
    
        
        | Name | Type | Description |  
            
                | viewer | Viewer | YouScene.earth.viewer |  
            
                | longitude | Number | 经度 |  
            
                | latitude | Number | 纬度 |  
 Returns:
    返回在场景上的高度