如何增加传递地址的信息窗口的高度?它在带有 IE8 和 Firefox 的 Windows 7 中正确显示,但在 Windows XP 中,地址部分位于信息窗口之外。
function initialize() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map_canvas"),
{ size: new GSize(400,300) } );
map.setCenter(new GLatLng(23.027527,72.508223), 13);
var point = new GLatLng(23.027527,72.508223);
var html_text = "<table cellspacing=0 cellpadding=0><tr><td><b><font size=-1px>hi</font></b></td></tr><tr><td><font size=-2px>hisdf,</font></td></tr><tr><td><font size=-2px>hisdf</font></td></tr><tr><td><font size=-2px>hisdfs</font></td></tr></table>";
var marker = new GMarker(point, G_DEFAULT_ICON);
map.addOverlay(marker);
marker.openInfoWindowHtml(html_text);
GEvent.addListener(marker, "mouseover", function() {
marker.openInfoWindowHtml(html_text);
});
map.enableScrollWheelZoom();
var customUI = map.getDefaultUI();
customUI.controls.scalecontrol = false;
map.setUI(customUI);
}
}
这是我的代码,我如何在函数中应用 div 你能建议我吗?
谷歌地图 API 示例
function initialize() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map_canvas"),
{ size: new GSize(400,300) } );
map.setCenter(new GLatLng(23.027527,72.508223), 13);
var point = new GLatLng(23.027527,72.508223);
var html_text = "<table cellspacing=0 cellpadding=0><tr><td><b><font size=-1px>Cadila Healthcare Ltd</font></b></td></tr><tr><td><font size=-2px>Satellite Cross Roads, Ahmedabad,</font></td></tr><tr><td><font size=-2px>Gujarat, India, 380015</font></td></tr><tr><td><font size=-2px>Phone : 79-26868100</font></td></tr></table>";
var marker = new GMarker(point, G_DEFAULT_ICON);
map.addOverlay(marker);
marker.openInfoWindowHtml(html_text);
GEvent.addListener(marker, "mouseover", function() {
marker.openInfoWindowHtml(html_text);
});
map.enableScrollWheelZoom();
var customUI = map.getDefaultUI();
customUI.controls.scalecontrol = false;
map.setUI(customUI);
}
}
</script>