Programing a search button with Google Earth API

Go To


I´m using the google earth API, I have create an input type text, in which i will like to include some direction, the I create a button witch is suposed to use the text include in the forst button.

I will like to what I should do (better with explications) in javascript to use the text in the first button as the direction to go in the map when clicking the second button.


2012-04-04 16:49
by jcernuda95


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 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-09 20:31
by jlivni