【发布时间】:2013-08-21 18:04:19
【问题描述】:
我正在使用这个Example,我想将 Google EARTH 设置为默认视图。
【问题讨论】:
标签: google-maps iframe google-earth google-earth-plugin
我正在使用这个Example,我想将 Google EARTH 设置为默认视图。
【问题讨论】:
标签: google-maps iframe google-earth google-earth-plugin
使用 setMapType 设置所需的地图类型:
map.setMapType(G_SATELLITE_3D_MAP);
<edit>:链接的示例使用 Maps-API V2,对于 V3,它有点不同。等待地图的空闲事件并将 mapType 设置为 'GoogleEarthAPI' 。
转到文档的第 116 行并修改它:
if (isGEinstalled)
{
googleEarth = new GoogleEarth(map);
//add the following line
google.maps.event.addListenerOnce(map,'idle',function(){map.setMapTypeId('GoogleEarthAPI')});
}
else
{
alert("O plugin de Google Earth não está instalado");
}
【讨论】: