admin管理员组

文章数量:1538120

2024年6月6日发(作者:)

/article/

这里的Google Earth API(本文的Google Earth API和最新Google

Earth API概念不同,前者是windows 程序以COM接口开发,目前的

Google Earth API是通过Google Earth 插件在浏览器理开发的API

函数,本文主要是讲windows 程序以COM接口开发)不同于GoogleMAP

API:大家可能对于GoogleMAP API有一些印象了而且网上对于

GoogleMAP API的应用也有很多比如/

那么什么是GoogleEarth API呢?GoogleEarth API能作什么呢?下

面我就结合我编的一些东西讲讲GoogleEarth API

Google Earth API Keyhole 1.0 Type Library当你要使用

GoogleEarth API时首先要在工程里引用他,以VB为例,在“工程”

菜单中选择“引用”,如果你已经安装了GoogleEarth,那么引用栏

里会有“Keyhole 1.0 Type Library ”而它是定位于GoogleEarth

的主程序的。引用完毕后,打开对象浏览器,你就可以看到

GoogleEarth API的类和函数及属性了!!

GoogleEarth API有4个类,每个类下面有多个函数及属性 下面将

我常用的函数的说明写到下面:

Class KHFeature

Property hasView As Long 只读

暂时还不知道什么意思,没用过,哪位高手能给个解释

Property visibility As Long 地标的可视

选项

Class KHInterface

Property autopilotSpeed As Double

GE的自动飞行速度

Function currentView(terrain As Long) As KHViewInfo

GE的当前视图

Property currentViewExtents As KHViewExtents 只读

Function getFeatureByName(name As String) As KHFeature

Function getPointOnTerrainFromScreenCoords(screen_x As

Double,

screen_y As Double) As Double()

Sub LoadKml(kmlData As String) 导入KML字符串,不支

持中文

Sub OpenFile(fileName As String) 打开地标文件

Sub QuitApplication() 退出程序

Sub SaveScreenShot(fileName As String, quality As

Long)

保存截图

Sub setFeatureView(feature As KHFeature, speed As Double)

Sub SetRenderWindowSize(width As Long, height As Long)

Sub setView(view As KHViewInfo, terrain As Long, speed As

Double)

本文标签: 打开程序引用开发函数