Google Earth API for Google Maps v3

This library integrates the Google Earth API, and will render most map overlays appropriately.

To initialize the Earth API, just instantiate a new GoogleEarth object, passing your map to it. Here is the simplest case of a map with no overlays:

    var myOptions = {
      zoom: 4,
      center: new google.maps.LatLng(48.25, 11.00),
      mapTypeId: google.maps.MapTypeId.ROADMAP
    var map = new google.maps.Map(document.getElementById('map'), myOptions);
    var ge = new GoogleEarth(map);

The current version of this library also supports a number of different overlays and layers. If you add any of the following to your map, they will also be displayed in Earth: Marker, InfoWindow, Polyline, Polygon, Rectangle, Circle, GroundOverlay and KmlLayer.

For an example that makes use of all these, check out earth.html.

class GoogleEarth


Constructor Description
GoogleEarth(map:google.maps.Map) A wrapped Google Earth API instance, linked to the map.


Constant Description
MAP_TYPE_ID This map type displays the 3D Earth Plugin


Methods Return Value Description
getInstance() The Earth API instance