打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
google earth com api 中IApplicationGE 接口SetCam...

HRESULT IApplicationGE::SetCameraParams  ( [in] double  lat, 
  [in] double  lon, 
  [in] double  alt, 
  [in] AltitudeModeGE  altMode, 
  [in] double  range, 
  [in] double  tilt, 
  [in] double  azimuth, 
  [in] double  speed  
 )  

Flies to the specified camera without requiring an ICameraInfoGE instance.

This is provided for performance reasons.

This is an optimized way of setting the camera rather than using SetCamera since it requires a much smaller number of COM calls.

Parameters:
lat Latitude in degrees. Between -90 and 90.
lon Longitude in degrees. Between -180 and 180.
alt Altitude in meters.
altMode Altitude mode that defines altitude reference origin.
range Distance between focus point and camera in meters.
tilt Tilt angle in degrees. Between 0 and 90.
azimuth Azimuth angle in degrees.
speed Speed factor to use. Overrides autopilot speed. Value must be greater than 0. If greater than or equal to 5.0, the camera will immediately be set without any transition. This mode is called 'teleport'.
Return values:
S_OK Successfully set camera.
S_TELEPORTED Given speed is grater than or equal to 5.0, in which case application's camera was teleported to the destination view.
E_INVALIDARG invalid argument(s) (e.g. speed is not more than zero).
E_APPLICATION_UNINITIALIZED Google Earth is not initialized. See IsInitialized.
(other) Appropriate error code.
See also:
SetCamera, ICameraInfoGE

上面是来自google earth com api 官方文档的资料,http://earth.google.com/comapi/interfaceIApplicationGE.html#9e1c8da5b36e8687fe718f2267224103

Description

Defines a virtual camera that is associated with any element derived from Feature. The LookAt element positions the "camera" in relation to the object that is being viewed. In Google Earth, the view "flies to" this LookAt viewpoint when the user double-clicks an item in the Places panel or double-clicks an icon in the 3D viewer.

Elements Specific to LookAt

<longitude>
Longitude of the point the camera is looking at. Angular distance in degrees, relative to the Prime Meridian. Values west of the Meridian range from ?180 to 0 degrees. Values east of the Meridian range from 0 to 180 degrees.
<latitude>
Latitude of the point the camera is looking at. Degrees north or south of the Equator (0 degrees). Values range from ?90 degrees to 90 degrees.
<altitude>
Distance from the earth's surface, in meters. See <altitudeMode> for how this value is interpreted.
<heading>
Direction (that is, North, South, East, West), in degrees. Default=0 (North). (See diagram below.) Values range from 0 to 360 degrees.
<tilt>
Angle between the direction of the LookAt position and the normal to the surface of the earth. (See diagram below.) Values range from 0 to 90 degrees. Values for <tilt> cannot be negative. A <tilt> value of 0 degrees indicates viewing from directly above. A <tilt> value of 90 degrees indicates viewing along the horizon.
<range> (required)
Distance in meters from the point specified by <longitude>, <latitude>, and <altitude> to the LookAt position. (See diagram below.)
<altitudeMode>
Specifies how the <altitude> specified for the LookAt point is interpreted. Possible values are as follows:
  • clampToGround - (default) Indicates to ignore the <altitude> specification and place the LookAt position on the ground.
  • relativeToGround - Interprets the <altitude> as a value in meters above the ground.
  • absolute - Interprets the <altitude> as a value in meters above sea level.

This diagram illustrates the <range>, <tilt>, and <altitude> elements:

上面的图来自KML文档,解释的比较清楚

http://code.google.com/apis/kml/documentation/kmlreference.html#lookat

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Google Earth API开发者指南
PHP 取照片EXIF中GPS的经纬度,并根据GPS进行GOOGLE地图定位
目前最强大三维地图PC版软件,超越Google Earth,不服来用
Google Earth拍到的飛碟、麥田圈
Google Earth新增歷史地圖
换个角度看地球Google Earth
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服