Para ver este recurso debes bajar el complemento para tu
navegador aquí
Google
google.load("earth", "1");
google.load("maps", "2.99"); // For JS geocoder
var ge = null;
var geocoder;
function init() {
geocoder = new GClientGeocoder();
google.earth.createInstance("map3d", initCB, failureCB);
}
function initCB(object) {
ge = object;
ge.getWindow().setVisibility(true);
}
function failureCB(object) {
alert('load failed');
}
function submitLocation() {
var address = document.getElementById('address').value;
geocoder.getLatLng(
address,
function(point) {
if (point && ge != null) {
var la = ge.createLookAt('');
la.set(point.y, point.x, 100, ge.ALTITUDE_RELATIVE_TO_GROUND,
0, 0, 4000);
ge.getView().setAbstractView(la);
}
}
);
}
... Leer más