@Override
public void onPlaceClicked(final Place place) {
LatLng p = place.getLocation();
MapWidget _map = _transitMapManager.getMap();
InfoWindow window = _map.getInfoWindow();
FlowPanel panel = new FlowPanel();
panel.add(new DivWidget(place.getName()));
String desc = place.getDescriptionAsString();
if (desc.length() > 0)
panel.add(new DivWidget(desc));
DivPanel row = new DivPanel();
panel.add(row);
Anchor anchor = new Anchor("Show nearby transit stops");
row.add(anchor);
anchor.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent arg0) {
_transitMapManager.showPlace(place, true,
ShowPlacesOnMapToggleHandler.this);
}
});
window.open(p, new InfoWindowContent(panel));
}