2013-09-01 1 views
0

바이너리가없는 다른 응용 프로그램을 제어하는 ​​응용 프로그램을 작성하는 경우
예를 들어 Google 어스를 열어 카메라를 배치 할 응용 프로그램 내 응용 프로그램이 -24,131을 말한 다음 특정 폴더에 이미지를 저장하도록 google earth 명령을 내리면됩니다.제어 응용 프로그램으로 Google 어스를 제어하는 ​​경우

어떻게 접근하나요? 실행중인 기능을 알고 제어 프로그램을 대신하여 실행할 수있는 방법은 무엇입니까? 또한 이미지를 다운로드 할 수 있도록 이미지 다운로드가 완료되었음을 알아야합니다.

나는 구글 어스에 대한 API가 보았다,하지만 난 (응용 프로그램 자체)

+0

예, Google 어스 API는이 (제어 GE 자체, 즉)을 수행 할 수 있습니다. –

답변

0

당신은 Google 어스 API를 사용할 수를 구글에서 지구를 제어하는 ​​데 사용할 수 있는지 (developers.google을 모르는 .com/earth /)를 사용하여 Google 어스 세계 인스턴스를 제어 할 수 있습니다.

여기

페이지의 자바 스크립트 코드 스냅 샷 :

var ge; 

google.load("earth", "1"); 

function init() { 
    google.earth.createInstance('map3d', initCB, failureCB); 
    } 
function initCB(instance) { 
    ge = instance; 
    ge.getWindow().setVisibility(true); 
    ge.getOptions().setStatusBarVisibility(true); 
    ge.getNavigationControl().setVisibility(ge.VISIBILITY_AUTO); 
    ge.getLayerRoot().enableLayerById(ge.LAYER_BORDERS, true); 
    ge.getLayerRoot().enableLayerById(ge.LAYER_ROADS, true); 

    var lookAt = ge.createLookAt(''); 
    lookAt.setLatitude(41.26); 
    lookAt.setLongitude(-100.00); 
    lookAt.setRange(800000.0); 
    ge.getView().setAbstractView(lookAt); 
} 

function failureCB(errorCode) { 
    alert(errorCode); 
} 

    google.setOnLoadCallback(init); 
여기

페이지의 HTML 코드 :

<!DOCTYPE html> 
<head> 
    <script src="http://www.google.com/jsapi"></script> 
</head> 
    <style> 
     body { 
      margin:20px; 
       height:100%; 
      width:98%; 
} 
     #map3d { 
      width:75%; 
      float:right; 
    } 
</style> 
<body> 
    <div id="map3d"></div> 
</body> 
</html> 

다음은, wkhtml2pdf (code.google.com/p/wkhtmltopdf/) 기능 wkhtmltoimage를 사용하거나 PhantomJs (github.com/ariya/phantomjs/wiki/Screen-Capture)를 방문하여 이미지 버전을 받으십시오.

희망이 있습니다.

건배, 미하이는

관련 문제