task_22027 #4

Merged
francesco.mangiacrapa merged 14 commits from task_22027 into master 2021-12-07 09:50:57 +01:00
2 changed files with 23 additions and 9 deletions
Showing only changes of commit 74e21e9962 - Show all commits

View File

@ -32,6 +32,7 @@ import org.gcube.portlets.user.geoportaldataviewer.client.gis.ExtentWrapped;
import org.gcube.portlets.user.geoportaldataviewer.client.gis.MapUtils;
import org.gcube.portlets.user.geoportaldataviewer.client.gis.OpenLayerMap;
import org.gcube.portlets.user.geoportaldataviewer.client.ui.GeonaDataViewMainPanel;
import org.gcube.portlets.user.geoportaldataviewer.client.util.LoaderIcon;
import org.gcube.portlets.user.geoportaldataviewer.client.util.URLUtil;
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.BaseMapLayer;
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.GeoQuery;
@ -41,6 +42,10 @@ import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
import com.google.gwt.core.client.ScriptInjector;
import com.google.gwt.dom.client.Style;
import com.google.gwt.dom.client.Style.Display;
import com.google.gwt.dom.client.Style.Position;
import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.event.logical.shared.ResizeEvent;
import com.google.gwt.event.logical.shared.ResizeHandler;
import com.google.gwt.event.shared.HandlerManager;
@ -94,7 +99,7 @@ public class GeoportalDataViewer implements EntryPoint {
int attempt = 0;
//private LoaderIcon loaderApp = new LoaderIcon("Loading application....");
private LoaderIcon loaderApp = new LoaderIcon("Loading application... please wait");
private HTML attributionDiv = new HTML();
@ -104,11 +109,9 @@ public class GeoportalDataViewer implements EntryPoint {
* This is the entry point method.
*/
public void onModuleLoad() {
// Style style = loaderApp.getElement().getStyle();
// style.setZIndex(300);
// style.setMarginTop(50,Unit.PX);
// style.setMarginLeft(50, Unit.PX);
loaderApp.getElement().addClassName("loader-gna-app");
RootPanel.get(APP_DIV).add(loaderApp);
paramWmsRequest = Window.Location.getParameter(GeoportalDataViewerConstants.GET_WMS_PARAMETER);
paramGeonaItemType = Window.Location.getParameter(GeoportalDataViewerConstants.GET_GEONA_ITEM_TYPE);
@ -119,7 +122,7 @@ public class GeoportalDataViewer implements EntryPoint {
GWT.log(GeoportalDataViewerConstants.GET_GEONA_ITEM_ID + " = " + paramGeonaItemID);
GWT.log(GeoportalDataViewerConstants.GET_LAYER_TITLE + " = " + paramLayerTitle);
//RootPanel.get(APP_DIV).add(loaderApp);
RootPanel.get(APP_DIV).add(loaderApp);
mainPanel = new GeonaDataViewMainPanel(applicationBus, getClientHeight());
RootPanel.get(APP_DIV).add(mainPanel);
@ -134,13 +137,17 @@ public class GeoportalDataViewer implements EntryPoint {
@Override
public void onFailure(Throwable caught) {
//RootPanel.get(APP_DIV).remove(loaderApp);
RootPanel.get(APP_DIV).remove(loaderApp);
Window.alert("Error occurred on instancing the GeoPortale Viewer. Please, contact the support");
}
@Override
public void onSuccess(List<BaseMapLayer> listBaseMapLayers) {
//RootPanel.get(APP_DIV).remove(loaderApp);
try {
RootPanel.get(APP_DIV).remove(loaderApp);
}catch (Exception e) {
loaderApp.setVisible(false);
}
GeoportalDataViewer.listBaseMapLayers = listBaseMapLayers;
//now the map is loaded and I'm sure that I can load the GeonaDataViewer Profile
loadGeonaDataViewerProfile();

View File

@ -443,4 +443,11 @@ body {
background-color: #f3f3f3 !important;
text-decoration: none;
}
.loader-gna-app {
z-index: 50;
position: absolute;
top: 50%;
left: 50%;
}