1

我正在使用谷歌地球 API,我创建了一个输入类型的文本,我想在其中包含一些方向,我创建一个按钮女巫应该使用包含在 forst 按钮中的文本。

我会喜欢在 javascript 中我应该做的事情(更好的解释),以便在单击第二个按钮时使用第一个按钮中的文本作为进入地图的方向。

感谢

4

1 回答 1

2

One way of doing this is to use the Google Places API, which will return the coordinates (amongst other details) of the place being queried. So will the Google Maps API geocoder, which you can use along with your Earth API application.

Whatever you use, you will eventually need the latitude and longitude of the location, at which point you can fly to it (see https://developers.google.com/earth/documentation/camera_control for snippet examples of this.)

If this does not answer your question please provide more details on exactly what you're trying to do and where you are stuck.

于 2012-04-09T20:31:26.000 回答