diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/GeoportalDataViewer.java b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/GeoportalDataViewer.java index 587c98d..734440c 100644 --- a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/GeoportalDataViewer.java +++ b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/GeoportalDataViewer.java @@ -21,7 +21,6 @@ import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.ui.HTML; import com.google.gwt.user.client.ui.RootPanel; -// TODO: Auto-generated Javadoc /** * Entry point classes define onModuleLoad(). * @@ -30,12 +29,6 @@ import com.google.gwt.user.client.ui.RootPanel; * Oct 27, 2020 */ public class GeoportalDataViewer implements EntryPoint { - /** - * The message displayed to the user when the server cannot be reached or - * returns an error. - */ - private static final String SERVER_ERROR = "An error occurred while " - + "attempting to contact the server. Please check your network " + "connection and try again."; /** The Constant APP_DIV. */ public final static String APP_DIV = "geoportal-data-viewer"; @@ -75,7 +68,7 @@ public class GeoportalDataViewer implements EntryPoint { */ public void onModuleLoad() { - mainPanel = new GeonaDataViewMainPanel(eventBus); + mainPanel = new GeonaDataViewMainPanel(eventBus, 600); RootPanel.get(APP_DIV).add(mainPanel); diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/OLMapManager.java b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/OLMapManager.java index a6be7ac..40f7e73 100644 --- a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/OLMapManager.java +++ b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/OLMapManager.java @@ -24,7 +24,7 @@ public class OLMapManager { private Double zoomStart = null; private Double zoomEnd = null; private ol.Extent dragEndExtent = null; - private static final int QUERY_MIN_ZOOM_LEVEL = 10; + private static final int QUERY_MIN_ZOOM_LEVEL = 13; public OLMapManager(String targetId, HandlerManager eventBus) { this.targetId = targetId; @@ -169,10 +169,11 @@ public class OLMapManager { eventBus.fireEvent(new QueryDataEvent(select, endExt.getCenter())); } } - else if(zoomStart!=null && zoomEnd!=null && zoomEnd mapProducts = new HashMap(); - public GeonaDataViewMainPanel(HandlerManager eventBus) { + public GeonaDataViewMainPanel(HandlerManager eventBus, int mapHeight) { initWidget(uiBinder.createAndBindUi(this)); this.eventBus = eventBus; - mapPanel = new MapPanel("600px"); + mapPanel = new MapPanel(mapHeight+"px"); mapTabPanel.add(mapPanel); bindHandlers(); dataPointSelection.setIcon(IconType.SCREENSHOT); diff --git a/src/main/webapp/GeoportalDataViewer.css b/src/main/webapp/GeoportalDataViewer.css index 012704e..44920ff 100644 --- a/src/main/webapp/GeoportalDataViewer.css +++ b/src/main/webapp/GeoportalDataViewer.css @@ -43,7 +43,6 @@ width: 0; position: absolute; pointer-events: none; - visibility: visible; } .ol-popup:after { @@ -109,4 +108,24 @@ color: gray; font-weight: bold; width: 200px; -} \ No newline at end of file +} + +.ol-mouse-position { + top: 8px !important; + right: 60px !important; + position: absolute !important; + border: 2px solid #eee; + color: #eee; + font-size: 12px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all .25s; + background: rgba(0,60,136,.5); + border-radius: 2px; + padding-left: 2px; + padding-right: 2px; + padding-bottom: 1px; + padding-top: 1px; + +}