Open GoogleCodeExporter opened 9 years ago
Original comment by api.roman.public@gmail.com
on 1 Aug 2009 at 12:12
Hey,
I feel your pain. It seems in firefox that you need to set the height of the
map3d explicitly.
In my GoogleEarthWidget, I got around this by overriding the setHeight method
to become
public void setHeight(String height) {
super.setHeight(height);
//super.setHeight only sets the height on the outer GWT HTML element that wraps
//the map3d div. This seems to resize the map in chrome but not firefox 4.
//Firefox 4 requires the size to be set on the map3d div itself
Element e = DOM.getElementById(mapDivId + instanceId);
if (e != null) {
DOM.setStyleAttribute(e, "height", height);
}
}
Where instanceId is the id of the plugin, so usually 0, you need to copy the
static one that is there, if that confuses you just let me know and i'll
explain it better, and mapDivId is just 'map3d'.
My html element is configured like so :
final String div = "<div class='" + mapDivId + "' border=1 id='" + mapDivId + id + "'></div>";
instanceId = id;
html = new HTML(div);
setElement(html.getElement());
Hope this helps.
Original comment by john.d.r...@gmail.com
on 5 Apr 2011 at 8:49
Original issue reported on code.google.com by
curtis.jensen
on 24 Jun 2009 at 3:45