}
assertTrue(downloadedServices>0);
// now choose the first service for download
Service service = serviceList.getServices().get(0);
service.addListener(new DownloadFinishedListener() {
public void downloadFinished(DownloadFinishedData dfd) {
synchronized(sl) {
sl.notifyAll();
}
}
public void downloadFailed(DownloadFinishedData dfd, Exception e) {
InfoWindow.showError(e);
synchronized(sl) {
sl.notifyAll();
}
}
});
service.download();
synchronized(sl) {
sl.wait();
}
assertTrue(service.getGeometry() != null);
assertEquals("sphere", ((GeometryMapTree) service.getGeometry()).getBase());
// then download the first texture map tile and heightfield map tile
GeometryMapTree geometry = (GeometryMapTree) service.getGeometry();
geometry.addListener(new DownloadFinishedListener() {
public void downloadFinished(DownloadFinishedData dfd) {
synchronized(sl) {
sl.notifyAll();