How do I convert my google maps application into a google earth application?

前端 未结 3 626
长情又很酷
长情又很酷 2021-01-15 05:33

On maps.google.com you can see a brilliant example on how a google maps application can suddenly turn into a google earth application smoothly.

I\'m developing a goo

3条回答
  •  旧巷少年郎
    2021-01-15 05:52

    To add the Google Earth instance to your map, simply add the G_SATELLITE_3D_MAP to your map with GMap2.addMapType().

    var map = new GMap2(document.getElementById("map_canvas"),{ size: new GSize(640,480) } );
    map.setCenter(new GLatLng(42.366662,-71.106262), 11);
    
    // Enable the Earth map type
    map.addMapType(G_SATELLITE_3D_MAP);
    
    var mapControl = new GMapTypeControl();
    map.addControl(mapControl);
    map.setMapType(G_SATELLITE_3D_MAP);
    

    Here is the information on Integrating v2 of the maps Api with the Google Earth Plugin http://code.google.com/apis/maps/documentation/javascript/v2/services.html#Earth

提交回复
热议问题