Example usage for com.google.gwt.maps.client.overlay HasMarker setTitle

List of usage examples for com.google.gwt.maps.client.overlay HasMarker setTitle

Introduction

In this page you can find the example usage for com.google.gwt.maps.client.overlay HasMarker setTitle.

Prototype

void setTitle(String title);

Source Link

Usage

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

License:Apache License

private void fetchRSSNews() {
    geoRSSService.loadGeoRSSNews(new AsyncCallback<List<NewMap>>() {
        @Override/*  w  w  w .j ava 2  s. c  o m*/
        public void onSuccess(List<NewMap> result) {
            int resultados = result.size();
            if (result != null && resultados > 0) {
                for (int i = 0; i < resultados; ++i) {
                    final NewMap newMap = result.get(i);
                    final HasLatLng location = view.createLatLng(newMap.getLatitude(), newMap.getLongitude());
                    final HasMarker marker = view.createMarkerAt(location);
                    markers.add(marker);
                    marker.setTitle(newMap.getPlacename());
                    attachArticles(marker, newMap.getArticles());
                }
                /*                              
                               display.setFuenteRSSDetail("Marcadores de Noticias: " + markers.size());
                                       
                               display.setNewsList(markers);*/
            }

            /*
             * for (int i = 0; i < 5; ++i) { final HasLatLng location =
             * display.createLatLng(southWest.getLatitude() + (latSpan *
             * Math.random()), southWest.getLongitude() + (lngSpan *
             * Math.random())); final HasMarker marker =
             * display.createMarkerAt(location); markers.add(marker); int j
             * = i + 1; marker.setTitle("" + j); attachSecretMessage(marker,
             * i); }
             */

        }

        @Override
        public void onFailure(Throwable caught) {
            Window.alert("Error obteniendo detalles de noticias");
        }
    });
}