Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Latitude Longitude Address Google Earth COM API GetResults GetCamera FocusPointLatitude FocusPointLongitude
The following code uses the Google Earth COM API to get the latitude and longitude a particular address.
objGE = CreateObject("GoogleEarth.ApplicationGE") While @TRUE If objGE.IsInitialized() && objGE.IsOnline() Then Break EndWhile dblAPo = objGE.AutoPilotSpeed objGE.AutoPilotSpeed = 5 objSC = CreateObject("GoogleEarth.SearchcontrollerGE") objSC.ClearResults () TimeDelay(1) objSC.Search("5421 California Ave SW, Seattle, Wa 98136") While objSC.IsSearchInProgress TimeDelay(1) EndWhile ;feature Collection objFC = objSC.GetResults For i = 1 To objFC.Count Name = objFC.Item(i).Name objFChild = objFC.item(i).GetChildren For j = 1 To objFChild.Count Pause("Child", objFChild.Item(j).Name ) Next ;Get latitude and Longitude camPos = objGE.GetCamera(0) LAT = camPos.FocusPointLatitude LONG = camPos.FocusPointLongitude Pause( Name, 'LAT: ' : LAT : @CRLF : 'LONG: ': LONG) Next objGE = 0 objSC = 0 Exit
Article ID: W18122
Filename: Get Latitude and Longitude of Address.txt
File Created: 2009:02:18:09:42:44
Last Updated: 2009:02:18:09:42:44