Das Wiki für den Bayerischen Wald

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen gezeigt.

Link zu dieser Vergleichsansicht

google_earth_3d [2018/04/22 06:28] (aktuell)
Zeile 1: Zeile 1:
 +======= Google Earth 3D ======
 +
 +<​html>​
 +    <script src="​http://​maps.google.com/​maps?​file=api&​v=2.x&​key=ABQIAAAAUSBKoyDMLxSQ7fpmwZLkshS-XyCpDTUa25t9K7tgPZeAxcow8xTd3viNFptg11bDwccdAzIJQ98azw"​
 +            type="​text/​javascript"></​script>​
 +
 +
 +    <div id="​map"​ class="​map"​ style="​width:​500px;​height:​350px"></​div>​ <p>
 +    <div id="​message"></​div>​
 +
 +    <​script>​
 +
 +var ge = null;
 +var lookAt = null;
 +
 +function myEventListener() {
 +  var lookAt = ge.getView().copyAsLookAt(ge.ALTITUDE_RELATIVE_TO_GROUND);​
 +  document.getElementById("​message"​).innerHTML = "lat: "​+lookAt.getLatitude()+"​ long: "​+lookAt.getLongitude()+"​ alt: "​+lookAt.getAltitude()+"​ heading:"​+lookAt.getHeading()+"​ tilt: "​+lookAt.getTilt(); ​
 +}
 +
 +function getEarthInstanceCB(object) {
 +  ge = object;
 +  // You can now manipulate ge using the full Google Earth API.
 +  google.earth.addEventListener(ge.getWindow(),​ "​mousedown",​ myEventListener);​
 +  ge.getWindow().setVisibility(true);​
 +  setTimeout(function() { 
 +    var lookAt = ge.getView().copyAsLookAt(ge.ALTITUDE_RELATIVE_TO_GROUND);​
 +    lookAt.setTilt(80);​
 +    ge.getView().setAbstractView(lookAt)
 +}, 2); 
 +}
 +
 +     var map = new GMap2(document.getElementById("​map"​));​
 +     ​map.setCenter(new GLatLng(37.775196,​ -122.419204),​ 13);
 +     ​map.addMapType(G_SATELLITE_3D_MAP);​
 +     ​map.addControl(new GHierarchicalMapTypeControl());​
 +     ​map.setMapType(G_SATELLITE_3D_MAP);​
 +     ​map.getEarthInstance(getEarthInstanceCB);​
 +</​script>​
 +
 +
 +</​html>​
  

google_earth_3d.txt · Zuletzt geändert: 2018/04/22 06:28 (Externe Bearbeitung)

test