Example usage for com.google.gwt.maps.client.base HasInfoWindow open

List of usage examples for com.google.gwt.maps.client.base HasInfoWindow open

Introduction

In this page you can find the example usage for com.google.gwt.maps.client.base HasInfoWindow open.

Prototype

void open(HasMap map, HasMVCObject anchor);

Source Link

Document

Opens this InfoWindow on the given map.

Usage

From source file:es.uem.geoparser.client.presenter.GeoRSSPresenter.java

License:Apache License

/**
 * Anexando articulos//from   w w  w .  jav a2 s  .c o m
 * 
 * @param marker
 *            Marcador
 * @param articles
 *            Lista de articulos
 */
private void attachArticles(final HasMarker marker, final List<Article> articles) {
    final StringBuffer content = new StringBuffer();
    int numArticles = articles.size();
    for (int i = 0; i < numArticles; i++) {
        Article article = articles.get(i);
        content.append(article.getHeadline() + "." + article.getDescription());
    }
    final HasInfoWindow infoWindow = view.createInfoWindow(content.toString());

    view.addListener(marker, "click", new EventCallback() {
        @Override
        public void callback() {
            infoWindow.open(view.getMap(), marker);
        }
    });
}