LatLng pto = LatLng.create(new Double(trozos[0]), new Double(
trozos[1]));
InfoWindowOptions infoWindowOpts = InfoWindowOptions.create();
infoWindowOpts.setContent("<h4>" + trozos[2] + "</h4>");
final InfoWindow infoWindow = InfoWindow.create(infoWindowOpts);
MarkerOptions markerOpts = MarkerOptions.create();
markerOpts.setPosition(pto);
markerOpts.setTitle(trozos[2]);
markerOpts.setMap(map);
final Marker marc = Marker.create(markerOpts);
marc.addClickListener(new ClickHandler() {
@Override
public void handle(MouseEvent event) {
infoWindow.open(map, marc);
}
});
}
}