I am having a great time with the GWT Maps Api. However, I have run
into an issue with InfoWindows. The short story is that I need to make
them scrollable, and the fix for that with the non-gwt api is to add
overflow:auto and set the height of the div. This does not appear to be
configurable through the api. I noticed that in GWT the Widget object
can set the css style, but the infoWindow does not inherit from Widget
or any other class in that hierarchy. I also looked at the derived
html, and the InfoWindow div does not have a class name associated with
it (I would have expected .gwt-InfoWindow).
Any ideas on this?
openInfoWindow( Element content, GInfoWindowOptions opts)
Why not encapsulate your widget in a composite of the widget and a
scrollpanel element and then insert that into the infowindow?
AL.
Here is a code snippet for anyone else that is trying to do this.
...
public void onMouseOver(GMarker marker) {
ProjectInfo[] projects = country.getProjectInfo();
markup = "<ul>";
for (int i=0; i< projects.length; i++)
{
markup += "<li class='projInfoWindow'>" + projects[i].getTitle() +
"</li>";
}
markup += "</ul>";
if (projects.length > 5){
HTML hwidget = new HTML();
hwidget.setHTML(markup);
ScrollPanel scroller = new ScrollPanel(hwidget);
scroller.setStyleName("ks-layouts-Scroller");
marker.openInfoWindowHtml(scroller.toString());
}else{
marker.openInfoWindowHtml(markup);
}
}
On Nov 30, 8:57 am, "www.gtraffic.info"