How to navigate to an address GE API

95 views
Skip to first unread message

Lee Harvey

unread,
Nov 11, 2012, 9:09:47 PM11/11/12
to google-earth-...@googlegroups.com
i just want a simple function to , give me a birds eye view of the address, but the
object oriented style of javascript they use is confusing me how they wrap whole functions in parameters, hard to tell which function is of class, and classes are extended from google maps, is javascript the only way, is there a REST API PHP any help would be great

preferred style

ClassName.prototype.method = function(Obj)
}



{

starter code

<script language="javascript" type="text/javascript">
var ge;
    google.load("earth", "1");

    function init() 
{
      google.earth.createInstance('map3d', initCB, failureCB);
    }

    function initCB(instance) {
      ge = instance;
      ge.getWindow().setVisibility(true);
    }

    function failureCB(errorCode) 
{
    }

    google.setOnLoadCallback(init);
function buttonClick() 
{
var geocodeLocation = "28 Haughton Road Oakleigh, Victoria, Australia, 3186";
////document.getElementById('location').value;
var geocoder = new google.maps.ClientGeocoder();
var res = geocoder.getLatLng(geocodeLocation,"point"); 
alert(res);
function point()
{
var lookAt = ge.createLookAt('');
lookAt.set(point.y, point.x, 10, ge.ALTITUDE_RELATIVE_TO_GROUND,0, 60, 20000);
ge.getView().setAbstractView(lookAt);
}
}
</script>


Reply all
Reply to author
Forward
0 new messages