就我所知,您無法控制獨立Google Earth應用程序中氣球的外觀。如果您指的是Google地球插件的網頁,那麼您可以做一些細微的修改(例如設置寬度和高度)。
我做了一個網站,而不是氣球開放,我阻止該事件,獲取氣球的內容並在對話框中顯示它們。 你可以看到我的頁面在這裏 http://www.3dwhistler.com/
的我在做什麼是這方面的一個基本的例子:
google.earth.addEventListener(ge, 'balloonopening', function(event) {
event.preventDefault();
// sometimes event.preventDefault() doesn't work so use the following line instead (uncomment it obviously)
// ge.setBalloon(null);
// find out which placemark's balloon tried to open
var placemark = event.getBalloon().getFeature();
var placemark_desc = placemark.getDescription();
var placemark_name = placemark.getName();
// use this if you have 'unsafe' stuff in the balloon - eg javascript
var placemark_desc_active = placemark.getBalloonHtmlUnsafe();
// Do something with the info
});
希望將谷歌地球應用程序中做到這一點? – Sparky 2012-02-22 07:41:19
不,我只需要這個在谷歌地球插件的網頁。 – Unknown 2012-02-22 07:48:59