문제

I am using this Example and I want to set Google EARTH as default view.

도움이 되었습니까?

해결책

Use setMapType to set the desired mapType:

 map.setMapType(G_SATELLITE_3D_MAP);

<edit>:

The linked example uses the Maps-API V2, for V3 it's little bit different. Wait for the idle-event of the map and set the mapType to 'GoogleEarthAPI' .

Go to line 116 of your document and modify it:

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");
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top