Compare commits

...

32 Commits

Author SHA1 Message Date
Francesco Mangiacrapa 52ea4f5130 reverted to v3.6.0 2024-04-30 11:20:02 +02:00
Francesco Mangiacrapa 66d1baa4ee just to rebuild v3.6.0-SNAPSHOT 2024-04-30 11:13:10 +02:00
Francesco Mangiacrapa 8a3c4437a0 just to rebuild the SNAPSHOT 2024-04-30 11:10:54 +02:00
Francesco Mangiacrapa 8cf6d178b1 geoportal-data-mapper range updated at [1.0.1-SNAPSHOT, 2.0.0-SNAPSHOT) 2023-09-14 16:41:58 +02:00
Francesco Mangiacrapa 0733a62801 removed -SNAPSHOT 2023-09-11 15:08:50 +02:00
Francesco Mangiacrapa dea11a7b95 Merge pull request 'feature_25598' (!17) from feature_25598 into master
Reviewed-on: #17
2023-09-11 15:06:52 +02:00
Francesco Mangiacrapa b3555f4d98 improved CSS 2023-09-11 11:21:02 +02:00
Francesco Mangiacrapa eb92bc685c added -SNAPSHOT 2023-09-11 10:55:34 +02:00
Francesco Mangiacrapa 3099a31e32 Showing basic statistics (i.e. "X project published") via
'countByPhase'method [#25598]
2023-09-11 10:48:34 +02:00
Francesco Mangiacrapa 5cef21b4f0 Update README 2023-09-06 17:15:42 +02:00
Francesco Mangiacrapa e94532f04f removed -SNAPSHOT to be released 2023-09-05 15:20:17 +02:00
Francesco Mangiacrapa b57091278e Merge pull request 'gui_optimization_25461' (!16) from gui_optimization_25461 into master
Reviewed-on: #16
2023-09-05 15:16:50 +02:00
Francesco Mangiacrapa 5cde386089 moved details-panel at z-index: 950. Required for screen < 900px in
width (e.g. tablet)
2023-09-04 11:16:40 +02:00
Francesco Mangiacrapa ba9c8aee78 Using the latest libraries version: gwt-ol.v8.4.1 (with
openlayers.v6.6.1) and gwt.v2.10
2023-08-31 17:21:15 +02:00
Francesco Mangiacrapa 8967184d3c Optimized the UI for screen size 1200x1200 2023-08-31 15:17:21 +02:00
Francesco Mangiacrapa 6338792427 UI optimized for less than 1600w screen resolution 2023-08-29 14:41:32 +02:00
Francesco Mangiacrapa 34f2ba4c7e Media with max-width 2048px the details-panel has width 530px 2023-07-31 12:37:31 +02:00
Francesco Mangiacrapa 6c5c584c0f bug fixing #25293 2023-07-31 12:15:06 +02:00
Francesco Mangiacrapa 4d87eaf5a2 Updated README 2023-07-25 11:36:59 +02:00
Francesco Mangiacrapa 1781488971 Update 'README.md' 2023-07-12 23:43:33 +02:00
Francesco Mangiacrapa a399dbb912 Updated README 2023-07-08 18:38:23 +02:00
Francesco Mangiacrapa dd056fdc9e Updated README 2023-07-08 18:37:50 +02:00
Francesco Mangiacrapa d0271d662c Updated README 2023-07-08 18:36:28 +02:00
Francesco Mangiacrapa d5f2bf9a67 Updated README 2023-07-08 18:35:59 +02:00
Francesco Mangiacrapa a6ac952994 removed -SNAPSHOT to be released 2023-06-15 11:57:14 +02:00
Francesco Mangiacrapa 7383b01aa9 Fixed an issue regarding the set Layer Style facility, #25066?#note-7.
Moved to -SNAPSHOT
2023-06-15 11:56:46 +02:00
Francesco Mangiacrapa 9d92b14378 removed -SNAPSHOT to be released 2023-06-09 13:55:13 +02:00
Francesco Mangiacrapa 23feb1a3c8 Setting initial layer opacity at 0.8 2023-06-09 13:54:45 +02:00
Francesco Mangiacrapa b7885b3b72 removed -SNAPSHOT to be released 2023-06-09 11:08:42 +02:00
Francesco Mangiacrapa 0093af4cdf Added -SNAPSHOT and maven-parent 1.2.0 2023-06-09 11:07:43 +02:00
Francesco Mangiacrapa 412878f323 Removed -SNAPSHOT to be released 2023-06-09 10:45:05 +02:00
Francesco Mangiacrapa bb33754558 Merge pull request 'task_25066' (!15) from task_25066 into master
Reviewed-on: #15
2023-06-09 10:37:45 +02:00
32 changed files with 817 additions and 296 deletions

View File

@ -1,16 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/geoportal-data-viewer-app-3.5.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<classpathentry kind="src" output="target/geoportal-data-viewer-app-3.6.0/WEB-INF/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/geoportal-data-viewer-app-3.5.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="test" value="true"/>
@ -35,5 +30,5 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/geoportal-data-viewer-app-3.5.0-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/geoportal-data-viewer-app-3.6.0/WEB-INF/classes"/>
</classpath>

View File

@ -1,4 +1,4 @@
eclipse.preferences.version=1
lastWarOutDir=/home/francescomangiacrapa/git/geoportal-data-viewer-app/target/geoportal-data-viewer-app-3.5.0-SNAPSHOT
lastWarOutDir=/home/francescomangiacrapa/git/geoportal-data-viewer-app/target/geoportal-data-viewer-app-3.6.0
warSrcDir=src/main/webapp
warSrcDirIsOutput=false

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
@ -83,8 +83,42 @@
<wb-module deploy-name="geoportal-data-viewer-app-3.5.0-SNAPSHOT">
<wb-module deploy-name="geoportal-data-viewer-app-3.6.0">
@ -169,7 +203,24 @@
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
@ -254,7 +305,24 @@
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
@ -339,7 +407,24 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
@ -424,95 +509,30 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<dependent-module archiveName="geoportal-data-mapper-1.0.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-data-mapper/geoportal-data-mapper">
<dependent-module archiveName="geoportal-data-mapper-1.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-data-mapper/geoportal-data-mapper">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="uri-resolver-manager-1.8.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/uri-resolver-manager/uri-resolver-manager">
<dependency-type>uses</dependency-type>
</dependent-module>
@ -597,7 +617,24 @@
<property name="java-output-path" value="/geoportal-data-viewer-app/target/geoportal-data-viewer-app-0.0.1-SNAPSHOT/WEB-INF/classes"/>
@ -682,7 +719,24 @@
<property name="context-root" value="geoportal-data-viewer-app"/>
@ -767,7 +821,24 @@
</wb-module>

View File

@ -4,10 +4,17 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v3.5.0-SNAPSHOT]
## [v3.6.0]
- GUI optimization [#25461]
- Using the latest libraries version: gwt-ol.v8.4.1 (with openlayers.v6.6.1) and gwt.v2.10
- Showing basic statistics (i.e. "X project published") via 'countByPhase' method [#25598]
## [v3.5.0]
- Supported the cross-filtering [#25074]
- Supported the grouped custom layers [#25110]
- Managed the (WMS) Layer Style facility [#25066]
## [v3.4.0] - 2023-05-11

View File

@ -1,6 +1,6 @@
# GeoPortal Data Viewer App
The GeoPortal Data Viewer App is an application to access, discovery and navigate the Geoportal projects/documents by a Web-Map Interface
The "Geoportal data-viewer" technology allows users to access and search for spatio-temporal documents through a web GIS which allows them to: (i) navigate and select the projects published in the system by "geographical map" (spatial dimension) , (ii) navigate and select the relationships between projects (evolution of over time) via "timeline" (temporal dimension), (iii) view metadata and resources (images, layers, etc. .) of documents via the "project view detail", (iv) export a view of the map with the layer of interest or add the layers of a project to the main map, (v) manage the order and overlapping of the layers, (vi) execute spatial queries on the layers and view the results, (vii) search through metadata or temporal dimension queries for the projects of interest, (vii) apply spatial filters for cross-layer.
## Built With
@ -21,10 +21,33 @@ The GeoPortal Data Viewer App is an application to access, discovery and navigat
<img src="https://gcube.wiki.gcube-system.org/images_gcube/8/82/GeoPortalDataViewer_Architecture.png" style="max-width:800px;" alt="GeoPortal Data-Viewer - Architecture" />
## Showcase
##### D4GNA instance of Geoportal D4Science
see at [Dataset per il Geoportale Nazionale per lArcheologia (D4GNA)](https://gna.d4science.org/)
**D4GNA Viewer - OSM**
<img src="https://gcube.wiki.gcube-system.org/images_gcube/0/06/D4GNA_Viewer_OSM.png" style="max-width:800px;" alt="Data_Viewer_OSM" />
**D4GNA Viewer - MapBox**
<img src="https://gcube.wiki.gcube-system.org/images_gcube/9/9c/D4GNA_Viewer_MapBox.png" style="max-width:800px;" alt="Data_Viewer_MapBox" />
**D4GNA Viewer - Discovering...**
<img src="https://gcube.wiki.gcube-system.org/images_gcube/8/85/D4GNA_ERCIM_3.png" style="max-width:800px;" alt="D4GNA_ERCIM_3" />
<br />
<br />
<img src="https://gcube.wiki.gcube-system.org/images_gcube/9/9c/D4GNA_ERCIM_2.png" style="max-width:800px;" alt="D4GNA_ERCIM_2" />
## Documentation
Geoportal Service Documentation is available at [gCube CMS Suite](https://geoportal.d4science.org/geoportal-service/docs/index.html)
User Guide (DRAFT ITA) is available at [Guida al DataViewer D4GNA (DRAFT-ITA)](https://gcube.wiki.gcube-system.org/images_gcube/b/b3/D4science_Guida_al_DataViewer_D4GNA_bozza.pdf)
## Change log
See the [Releases](https://code-repo.d4science.org/gCubeSystem/geoportal-data-viewer-app/releases)

View File

@ -7,14 +7,14 @@
<parent>
<artifactId>maven-parent</artifactId>
<groupId>org.gcube.tools</groupId>
<version>1.1.0</version>
<version>1.2.0</version>
<relativePath />
</parent>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>geoportal-data-viewer-app</artifactId>
<packaging>war</packaging>
<version>3.5.0-SNAPSHOT</version>
<version>3.6.0</version>
<name>GeoPortal Data Viewer App</name>
<description>The GeoPortal Data Viewer App is an application to access, discovery and navigate the Geoportal projects/documents by a Web-Map Interface</description>
@ -23,6 +23,7 @@
<gwt.version>2.10.0</gwt.version>
<gwt.compiler.style>PRETTY</gwt.compiler.style>
<gson.version>2.6.2</gson.version>
<gwt.ol.version>8.4.1</gwt.ol.version>
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
<!-- GWT 2.9 support 8, 9 and 11 -->
<maven.compiler.source>1.8</maven.compiler.source>
@ -102,7 +103,7 @@
<dependency>
<groupId>com.github.tdesjardins</groupId>
<artifactId>gwt-ol3</artifactId>
<version>8.1.0-gwt2_9</version>
<version>${gwt.ol.version}</version>
</dependency>
<dependency>
<groupId>com.github.gwtbootstrap</groupId>
@ -146,7 +147,7 @@
<dependency>
<groupId>org.gcube.application</groupId>
<artifactId>geoportal-data-mapper</artifactId>
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
<version>[1.0.1-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
<scope>compile</scope>
</dependency>
<dependency>

View File

@ -52,6 +52,8 @@ import org.gcube.portlets.user.geoportaldataviewer.client.events.ShowPopupOnCent
import org.gcube.portlets.user.geoportaldataviewer.client.events.TimelineProjectRelationsEvent;
import org.gcube.portlets.user.geoportaldataviewer.client.events.TimelineProjectRelationsEvent.EVENT_TYPE;
import org.gcube.portlets.user.geoportaldataviewer.client.events.TimelineProjectRelationsEventHandler;
import org.gcube.portlets.user.geoportaldataviewer.client.events.UpdateLayerToMapEvent;
import org.gcube.portlets.user.geoportaldataviewer.client.events.UpdateLayerToMapEventHandler;
import org.gcube.portlets.user.geoportaldataviewer.client.events.ZoomOutOverMinimumEvent;
import org.gcube.portlets.user.geoportaldataviewer.client.events.ZoomOutOverMinimumEventHandler;
import org.gcube.portlets.user.geoportaldataviewer.client.events.collections.CloseCollectionEvent;
@ -109,6 +111,8 @@ import ol.Feature;
public class GeoportalDataViewer implements EntryPoint {
public static final String DIV_TIMELINE_DATA = "timeline-data";
public static final String DIV_LAYER_VIEW = "layer-viewer";
public static final String APP_NOTIFIER = "app-notifier";
@ -412,7 +416,8 @@ public class GeoportalDataViewer implements EntryPoint {
int height = rootHeight;
mainPanel.setPanelsHeight(height);
GWT.log("Set height: " + height);
mainPanel.setPanelsWidth(Window.getClientWidth());
}
/**
@ -947,6 +952,30 @@ public class GeoportalDataViewer implements EntryPoint {
}
});
applicationBus.addHandler(UpdateLayerToMapEvent.TYPE, new UpdateLayerToMapEventHandler() {
@Override
public void onUpdateLayer(UpdateLayerToMapEvent updateLayerToMapEvent) {
if (updateLayerToMapEvent != null && updateLayerToMapEvent.getOperation() != null) {
if (updateLayerToMapEvent.getLayerType().equals(
org.gcube.portlets.user.geoportaldataviewer.client.events.UpdateLayerToMapEvent.LAYER_TYPE.INDEX)) {
switch (updateLayerToMapEvent.getOperation()) {
case STYLE:
olMapMng.getOLMap().setLayerStyleForIndex(updateLayerToMapEvent.getLayerName(),
updateLayerToMapEvent.getValue());
break;
default:
break;
}
}
}
}
});
}
/**

View File

@ -14,6 +14,8 @@ import com.google.gwt.i18n.client.DateTimeFormat;
* Nov 24, 2020
*/
public class GeoportalDataViewerConstants {
public static final int TABLET_WIDTH = 1601;
public static final String MAP_DIV = "map";
@ -26,6 +28,7 @@ public class GeoportalDataViewerConstants {
public static final String GET_ZOOM = OpenLayersMapParameters.OL_MAP_PARAM.zoom.name();
public static final String GET_CENTER_MAP_TO_LONG_LAT = OpenLayersMapParameters.OL_MAP_PARAM.centermap.name();
public static final Double INITIAL_LAYER_OPACITY = 0.8;
public static final int SEARCH_LIMIT_RESULTS_TO_MAXIMUM = 50;
public static final DateTimeFormat DATE_TIME_FORMAT = DateTimeFormat.getFormat("dd MMMM yyyy");
@ -36,6 +39,32 @@ public class GeoportalDataViewerConstants {
public static final String PROJECT_ID_KEY_FEATURE = "projectid";
public static enum GisToolbarFacilities {
COLLECTION("Collection", "Open the collections"),
MAP("Map", "Select the base Map"),
OVERLAY("Overlay", "Add overlay layers"),
SEARCH("Search", "Search in the collections"),
FILTER("Filter", "Apply spatial filtering"),
LAYERS("Layers", "Layers added to Map"),
PRESET_LOCATION("Preset Location", "Center the Map to Location");
String name;
String tooltip;
GisToolbarFacilities(String name, String tooltip) {
this.name = name;
this.tooltip = tooltip;
}
public String getName() {
return name;
}
public String getTooltip() {
return tooltip;
}
}
/**
* The Enum LayerType.
*

View File

@ -227,4 +227,6 @@ public interface GeoportalDataViewerService extends RemoteService {
*/
String getHTTPResponseForURL(String url);
Integer getCountFor(String profileID, String phase, String status);
}

View File

@ -91,4 +91,6 @@ public interface GeoportalDataViewerServiceAsync {
void getHTTPResponseForURL(String url, AsyncCallback<String> callback);
void getCountFor(String profileID, String phase, String status, AsyncCallback<Integer> callback);
}

View File

@ -515,7 +515,7 @@ public class LayerManager {
GWT.log("Parsed WMS Request returned: " + geoInfoWMS);
LayerItem layerItem = toLayerItem(featureType, layerTitle, geoInfoWMS.getLayerName(),
geoInfoWMS.getWmsRequest(), geoInfoWMS.getBaseWmsServiceHost(), true, isBase,
geoInfoWMS.getWmsRequest(), geoInfoWMS.getServiceEndPoint(), true, isBase,
displayInLayerSwitcher, (ArrayList<String>) geoInfoWMS.getStyles().getGeoStyles(),
geoInfoWMS.getWmsRequest(), false, geoInfoWMS.getMapWMSNoStandard(),
geoInfoWMS.isNcWMS(), UUID, geoInfoWMS.getZAxis(), minResolution, maxResolution);
@ -553,7 +553,7 @@ public class LayerManager {
theLo = lo;
mapOtherLayerObjects.put(layerNameKey, theLo);
GWT.log("PROJECT_LAYER mapOtherLayerObjects is: " + mapOtherLayerObjects);
olMap.addWMSDetailLayer(layerItem);
olMap.addWMSDetailLayer(layerItem, GeoportalDataViewerConstants.INITIAL_LAYER_OPACITY);
overlayLayerManager.addLayerItem(theLo);
} else {
GWT.log("Skipping " + lo.getType() + " layer " + theLo.getLayerItem().getName()
@ -1142,6 +1142,7 @@ public class LayerManager {
FlexTable intFlex = new FlexTable();
intFlex.setCellPadding(1);
intFlex.setCellSpacing(1);
intFlex.getElement().addClassName("thePopDataTable");
if (projectDV.getTheDocument() != null) {
LinkedHashMap<String, Object> map = projectDV.getTheDocument().getDocumentAsMap();
// my-html-table

View File

@ -0,0 +1,134 @@
package org.gcube.portlets.user.geoportaldataviewer.client.events;
import org.gcube.portlets.user.geoportaldataviewer.shared.GCubeCollection;
import com.google.gwt.event.shared.GwtEvent;
/**
* The Class UpdateLayerToMapEvent.
*
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
*
* Jun 15, 2023
*/
public class UpdateLayerToMapEvent extends GwtEvent<UpdateLayerToMapEventHandler> {
public static Type<UpdateLayerToMapEventHandler> TYPE = new Type<UpdateLayerToMapEventHandler>();
private GCubeCollection collection;
private String layerName;
private REQUEST_PARAMETER operation;
private String value;
private LAYER_TYPE layerType;
/**
* The Enum REQUEST_PARAMETER.
*
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
*
* Jun 15, 2023
*/
public static enum REQUEST_PARAMETER {
STYLE
}
/**
* The Enum LAYER_TYPE.
*
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
*
* Jun 15, 2023
*/
public static enum LAYER_TYPE {
INDEX, DETAILS
}
/**
* Instantiates a new adds the layer to map event.
*
* @param collection the collection
* @param layerName the layer name
* @param type the type
*/
public UpdateLayerToMapEvent(GCubeCollection collection, String layerName, LAYER_TYPE type) {
this.collection = collection;
this.layerName = layerName;
this.layerType = type;
}
/**
* Gets the associated type.
*
* @return the associated type
*/
@Override
public Type<UpdateLayerToMapEventHandler> getAssociatedType() {
return TYPE;
}
/**
* Sets the operation.
*
* @param operation the operation
* @param value the value
*/
public void setOperation(REQUEST_PARAMETER operation, String value) {
this.operation = operation;
this.value = value;
}
/**
* Gets the value.
*
* @return the value
*/
public String getValue() {
return value;
}
/**
* Gets the layer type.
*
* @return the layer type
*/
public LAYER_TYPE getLayerType() {
return layerType;
}
/**
* Gets the operation.
*
* @return the operation
*/
public REQUEST_PARAMETER getOperation() {
return operation;
}
/**
* Gets the layer name.
*
* @return the layer name
*/
public String getLayerName() {
return layerName;
}
/**
* Gets the collection.
*
* @return the collection
*/
public GCubeCollection getCollection() {
return collection;
}
/**
* Dispatch.
*
* @param handler the handler
*/
@Override
protected void dispatch(UpdateLayerToMapEventHandler handler) {
handler.onUpdateLayer(this);
}
}

View File

@ -0,0 +1,20 @@
package org.gcube.portlets.user.geoportaldataviewer.client.events;
import com.google.gwt.event.shared.EventHandler;
/**
* The Interface UpdateLayerToMapEventHandler.
*
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
*
* Jun 15, 2023
*/
public interface UpdateLayerToMapEventHandler extends EventHandler {
/**
* On update layer.
*
* @param updateLayerToMapEvent the update layer to map event
*/
void onUpdateLayer(UpdateLayerToMapEvent updateLayerToMapEvent);
}

View File

@ -32,15 +32,15 @@ public class ExtentWrapped extends ol.Extent {
super(minX, minY, maxX, maxY);
}
/**
* @param coordinate coordinate to check.
* @return true if the passed coordinate is contained or on the edge of the
* extent.
*/
@JsOverlay
public final Coordinate getCenter() {
return getCenter((ol.Extent) this);
}
// /**
// * @param coordinate coordinate to check.
// * @return true if the passed coordinate is contained or on the edge of the
// * extent.
// */
// @JsOverlay
// public final Coordinate getCenter() {
// return getCenter((ol.Extent) this);
// }
@JsMethod(name = "getCenter", namespace = PACKAGE_EXTENT)
private static native Coordinate getCenter(Extent extent);

View File

@ -439,7 +439,7 @@ public abstract class OpenLayerMap {
imageWMSParams.setLayers(layerItem.getName());
ImageWmsOptions imageWMSOptions = OLFactory.createOptions();
imageWMSOptions.setUrl(layerItem.getMapServerHost());
imageWMSOptions.setUrl(layerItem.getMapServerEndpoint());
imageWMSOptions.setParams(imageWMSParams);
// imageWMSOptions.setRatio(1.5f);
@ -526,9 +526,10 @@ public abstract class OpenLayerMap {
/**
* Adds the WMS detail layer.
*
* @param layerItem the layer item
* @param layerItem the layer item
* @param initialOpacity the initial opacity
*/
public void addWMSDetailLayer(LayerItem layerItem) {
public void addWMSDetailLayer(LayerItem layerItem, double initialOpacity) {
if (wmsDetailsLayerMap == null)
wmsDetailsLayerMap = new LinkedHashMap<String, Image>();
@ -543,7 +544,7 @@ public abstract class OpenLayerMap {
imageWMSParams.setLayers(layerItem.getName());
ImageWmsOptions imageWMSOptions = OLFactory.createOptions();
imageWMSOptions.setUrl(layerItem.getMapServerHost());
imageWMSOptions.setUrl(layerItem.getMapServerEndpoint());
imageWMSOptions.setParams(imageWMSParams);
// imageWMSOptions.setRatio(1.5f);
@ -562,6 +563,7 @@ public abstract class OpenLayerMap {
Image wmsLayer = new Image(layerOptions);
int zIndex = layerOrder.getOffset(LayerOrder.LAYER_TYPE.WMS_DETAIL) + wmsDetailsLayerMap.size() + 1;
wmsLayer.setZIndex(zIndex);
wmsLayer.setOpacity(initialOpacity);
map.addLayer(wmsLayer);
wmsDetailsLayerMap.put(key, wmsLayer);
@ -593,7 +595,7 @@ public abstract class OpenLayerMap {
imageWMSParams.setLayers(layerItem.getName());
ImageWmsOptions imageWMSOptions = OLFactory.createOptions();
imageWMSOptions.setUrl(layerItem.getMapServerHost());
imageWMSOptions.setUrl(layerItem.getMapServerEndpoint());
imageWMSOptions.setParams(imageWMSParams);
// imageWMSOptions.setRatio(1.5f);
@ -1128,6 +1130,23 @@ public abstract class OpenLayerMap {
layer.setVisible(visible);
}
public void setLayerStyleForIndex(String layerName, String value) {
GWT.log("Setting style " + value + " for " + layerName);
Image indexWmsLayer = wmsLayerMap.get(layerName);
GWT.log("WMS layer is: " + indexWmsLayer);
if (indexWmsLayer != null) {
ImageWms imageWMSSource = indexWmsLayer.getSource();
ImageWmsParams imageWMSParams = imageWMSSource.getParams();
imageWMSParams.set("STYLES", value);
imageWMSSource.updateParams(imageWMSParams);
indexWmsLayer.setSource(imageWMSSource);
indexWmsLayer.changed();
}
}
/**
* Sets the WMS detail layer opacity.
*
@ -1199,7 +1218,7 @@ public abstract class OpenLayerMap {
public void fitToExtent(ol.Extent extent) {
ViewFitOptions opt = new ViewFitOptions();
opt.setMaxZoom(16);
opt.setDuration(SET_CENTER_ANIMATED_DURATION*5);
opt.setDuration(SET_CENTER_ANIMATED_DURATION * 5);
map.getView().fit(extent, opt);
}

View File

@ -11,9 +11,20 @@
top: 50px;
right: 10px;
}
.to-align-left {
position: absolute;
top: 5px;
color: white !important;
text-decoration: none !important;
}
.to-align-left :hover {
color: #F5F5F5;
}
</ui:style>
<g:HTMLPanel ui:field="detailsHTMLPanel" visible="false">
<b:Button ui:field="closeButton" addStyleNames="{style.to-align-right}"></b:Button>
<b:Button ui:field="closeButton" addStyleNames="{style.to-align-left}"></b:Button>
<g:HTMLPanel ui:field="datailsContainerPanel"></g:HTMLPanel>
</g:HTMLPanel>
</ui:UiBinder>

View File

@ -14,7 +14,9 @@ import org.gcube.application.geoportalcommon.shared.geoportal.config.layers.Conf
import org.gcube.application.geoportalcommon.shared.geoportal.config.layers.LayerIDV;
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.UseCaseDescriptorDV;
import org.gcube.application.geoportalcommon.shared.geoportal.view.ProjectView;
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewer;
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerConstants;
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerConstants.GisToolbarFacilities;
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerConstants.MAP_PROJECTION;
import org.gcube.portlets.user.geoportaldataviewer.client.events.ChangeMapLayerEvent;
import org.gcube.portlets.user.geoportaldataviewer.client.events.MapExtentToEvent;
@ -64,6 +66,7 @@ import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.LayoutPanel;
import com.google.gwt.user.client.ui.RadioButton;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.Widget;
@ -77,6 +80,8 @@ import com.google.gwt.user.client.ui.Widget;
*/
public class GeonaDataViewMainPanel extends Composite {
private static final String PLACEHOLDER_SELECT_SEARCH_IN = "Select Collection...";
private static GeonaDataViewMainPanelUiBinder uiBinder = GWT.create(GeonaDataViewMainPanelUiBinder.class);
@ -142,8 +147,10 @@ public class GeonaDataViewMainPanel extends Composite {
@UiField
ListBox navListSearch;
@UiField
ScrollPanel overlayLayersPanel;
//@UiField
//ScrollPanel overlayLayersPanel;
RootPanel overlayLayersPanel = RootPanel.get(GeoportalDataViewer.DIV_LAYER_VIEW);
@UiField
ScrollPanel searchFacilityPanel;
@ -179,6 +186,7 @@ public class GeonaDataViewMainPanel extends Composite {
mapPanel = new MapPanel(mapHeight + "px");
detailsPanel.setHeight(mapHeight + "px");
detailsPanel.setApplicationBus(applicationBus);
overlayLayersPanel.setVisible(false);
mainContainerPanel.add(mapPanel);
bindHandlers();
dataPointSelection.setIcon(IconType.SCREENSHOT);
@ -281,10 +289,17 @@ public class GeonaDataViewMainPanel extends Composite {
}
});
openCollectionDropDown.setTitle(GisToolbarFacilities.COLLECTION.getTooltip());
linkCustomOverlayLayers.setTitle(GisToolbarFacilities.OVERLAY.getTooltip());
linkCrossFilteringLayers.setTitle(GisToolbarFacilities.FILTER.getTooltip());
searchFacilityButton.setTitle(GisToolbarFacilities.SEARCH.getTooltip());
linkLayers.setTitle(GisToolbarFacilities.LAYERS.getTooltip());
linkMap.setTitle(GisToolbarFacilities.MAP.getTooltip());
linkPresetLocation.setTitle(GisToolbarFacilities.PRESET_LOCATION.getTooltip());
// layersDDB.setToggle(true);
bindEvents();
}
/**
@ -361,6 +376,27 @@ public class GeonaDataViewMainPanel extends Composite {
setOverlayPanelMaxHeight();
}
public void setPanelsWidth(int clientWidth) {
if(clientWidth<GeoportalDataViewerConstants.TABLET_WIDTH) {
openCollectionDropDown.setText("");
linkCustomOverlayLayers.setText("");
linkCrossFilteringLayers.setText("");
searchFacilityButton.setText("");
linkLayers.setText("");
linkPresetLocation.setText("");
linkMap.setText("");
}else {
openCollectionDropDown.setText(GisToolbarFacilities.COLLECTION.getName());
linkCustomOverlayLayers.setText(GisToolbarFacilities.OVERLAY.getName());
linkCrossFilteringLayers.setText(GisToolbarFacilities.FILTER.getName());
searchFacilityButton.setText(GisToolbarFacilities.SEARCH.getName());
linkLayers.setText(GisToolbarFacilities.LAYERS.getName());
linkMap.setText(GisToolbarFacilities.MAP.getName());
linkPresetLocation.setText(GisToolbarFacilities.PRESET_LOCATION.getName());
}
}
/**
* Sets the overlay panel max height.
@ -745,4 +781,6 @@ public class GeonaDataViewMainPanel extends Composite {
}
}

View File

@ -55,18 +55,15 @@
addStyleNames="open-collection-style">
</g:HTMLPanel>
</b:DropdownButton>
<b:DropdownButton type="LINK"
title="Select the base Map" text="Map" ui:field="linkMap" icon="GLOBE">
<b:DropdownButton type="LINK" text="Map" ui:field="linkMap" icon="GLOBE">
<g:HTMLPanel ui:field="panelBaseLayers">
</g:HTMLPanel>
</b:DropdownButton>
<b:DropdownButton type="LINK" visible="false"
title="Add overlay layers.." text="Overlay" ui:field="linkCustomOverlayLayers" icon="REORDER">
<b:DropdownButton type="LINK" visible="false" text="Overlay" ui:field="linkCustomOverlayLayers" icon="REORDER">
<g:HTMLPanel ui:field="panelCustomOverlayLayers" addStyleNames="overlay-panel-style">
</g:HTMLPanel>
</b:DropdownButton>
<b:DropdownButton type="LINK" visible="false"
title="Apply spatial filtering.." text="Filter" ui:field="linkCrossFilteringLayers" icon="FILTER">
<b:DropdownButton type="LINK" visible="false" text="Filter" ui:field="linkCrossFilteringLayers" icon="FILTER">
<g:HTMLPanel ui:field="panelCrossFilteringLayers" addStyleNames="filter-panel-style">
</g:HTMLPanel>
</b:DropdownButton>
@ -83,8 +80,7 @@
<g:ScrollPanel ui:field="searchFacilityPanel"
addStyleNames="search-facility"></g:ScrollPanel>
</b:DropdownButton>
<b:DropdownButton type="LINK"
title="Center Map to Location" text="Preset Location"
<b:DropdownButton type="LINK" text="Preset Location"
ui:field="linkPresetLocation" addStyleNames="preset-location">
<b:Nav>
<b:Button type="LINK" ui:field="extentToItaly"
@ -109,8 +105,8 @@
text="Remove Query" visible="false"></b:Button>
<b:Button type="LINK" text="Layers" ui:field="linkLayers">
</b:Button>
<g:ScrollPanel ui:field="overlayLayersPanel"
addStyleNames="layers-panel" visible="false"></g:ScrollPanel>
<!-- <g:ScrollPanel ui:field="overlayLayersPanel"
addStyleNames="layers-panel" visible="false"></g:ScrollPanel> -->
</g:HTMLPanel>
</g:HTMLPanel>
<c:DetailsPanel ui:field="detailsPanel"

View File

@ -23,6 +23,7 @@
color: white;
padding: 10px 10px;
font-size: 14px;
padding-left: 40px;
}
.width-100 {

View File

@ -219,7 +219,7 @@ public class OverlayCustomLayerPanel extends Composite {
flow.add(new HTMLPanel("Legend for: " + theLayerName));
final HorizontalPanel hpLegend = new HorizontalPanel();
String url = geoInformation.getBaseWmsServiceHost() + "?service=WMS&" + "version="
String url = geoInformation.getServiceEndPoint() + "?service=WMS&" + "version="
+ URLUtil.getValueOfParameter("version", wmsLink) + "&" + "request=GetLegendGraphic&" + "layer="
+ theLayerName;

View File

@ -1,5 +1,6 @@
package org.gcube.portlets.user.geoportaldataviewer.client.ui.dandd;
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerConstants;
import org.gcube.portlets.user.geoportaldataviewer.client.events.DoActionOnDetailLayersEvent;
import org.gcube.portlets.user.geoportaldataviewer.client.events.DoActionOnDetailLayersEvent.DO_LAYER_ACTION;
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.LayerItem;
@ -38,8 +39,8 @@ public class RangeSlider extends Composite {
sliderId = "slider-" + Random.nextInt();
theSlider.addClassName("slider");
theSlider.setId(sliderId);
theSlider.setTitle("Set opacity of "+layer.getName());
theSlider.setTitle("Set opacity of the layer");
theSlider.setPropertyObject("value", GeoportalDataViewerConstants.INITIAL_LAYER_OPACITY*100);
bindEvents();
}
@ -56,9 +57,9 @@ public class RangeSlider extends Composite {
DoActionOnDetailLayersEvent actionChangeOpacity = new DoActionOnDetailLayersEvent(
DO_LAYER_ACTION.OPACITY, layer, null);
int value = Integer.parseInt((String) theSlider.getPropertyObject("value"));
//GWT.log("opacity int value: "+value);
double opacity = (double) ((double) value/100);
GWT.log("opacity double value: "+opacity);
// GWT.log("opacity int value: "+value);
double opacity = (double) ((double) value / 100);
GWT.log("opacity double value: " + opacity);
actionChangeOpacity.setOpacity(opacity);
applicationBus.fireEvent(actionChangeOpacity);
}

View File

@ -5,6 +5,9 @@ import java.util.HashMap;
import org.gcube.application.geoportalcommon.shared.geoportal.materialization.IndexLayerDV;
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewer;
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerServiceAsync;
import org.gcube.portlets.user.geoportaldataviewer.client.events.UpdateLayerToMapEvent;
import org.gcube.portlets.user.geoportaldataviewer.client.events.UpdateLayerToMapEvent.LAYER_TYPE;
import org.gcube.portlets.user.geoportaldataviewer.client.events.UpdateLayerToMapEvent.REQUEST_PARAMETER;
import org.gcube.portlets.user.geoportaldataviewer.client.events.collections.CloseCollectionEvent;
import org.gcube.portlets.user.geoportaldataviewer.client.events.collections.OpenCollectionEvent;
import org.gcube.portlets.user.geoportaldataviewer.client.util.URLUtil;
@ -18,6 +21,8 @@ import com.github.gwtbootstrap.client.ui.ListBox;
import com.github.gwtbootstrap.client.ui.constants.ButtonType;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Style.FontWeight;
import com.google.gwt.event.dom.client.ChangeEvent;
import com.google.gwt.event.dom.client.ChangeHandler;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.ErrorEvent;
@ -42,13 +47,12 @@ import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.gwt.user.client.ui.Widget;
/**
* The Class LayerCollectionPanel.
*
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
*
* May 15, 2023
* May 15, 2023
*/
public class LayerCollectionPanel extends Composite {
@ -62,6 +66,9 @@ public class LayerCollectionPanel extends Composite {
@UiField
HTMLPanel styleListPanel;
@UiField
HTMLPanel statisticPanel;
@UiField
Button buttonLegend;
@ -77,6 +84,12 @@ public class LayerCollectionPanel extends Composite {
private ListBox listBoxStyles = new ListBox();
private String layerName;
private GCubeCollection gcubeCollection;
private HandlerManager applicationBus;
/**
* The Interface LayerCollectionPanelUiBinder.
*
@ -93,11 +106,13 @@ public class LayerCollectionPanel extends Composite {
* @param coll the coll
* @param applicationBus the application bus
*/
public LayerCollectionPanel(GCubeCollection coll, HandlerManager applicationBus) {
public LayerCollectionPanel(final GCubeCollection coll, HandlerManager applicationBus) {
initWidget(uiBinder.createAndBindUi(this));
this.applicationBus = applicationBus;
buttonLegend.setType(ButtonType.LINK);
legendPanel.setVisible(false);
statisticPanel.setVisible(false);
GWT.log("Found available collection " + coll);
String label = coll.getUcd().getName();
@ -112,27 +127,50 @@ public class LayerCollectionPanel extends Composite {
@Override
public void onValueChange(ValueChangeEvent<Boolean> event) {
GWT.log("Collection selector flag changed to value : " + event.toDebugString());
// String collectionID = ((CheckBox) event.getSource()).getId().replace("gcubeCollectionSelector_",
// "");
GWT.log("Collection ID is : " + collectionID + ", event value: " + event.getValue());
if (event.getValue()) {
// OPEN COLLECTION
applicationBus.fireEvent(new OpenCollectionEvent(collectionID));
enableLayerStyle(true);
} else {
// CLOSE COLLECTION
legendPanel.clear();
legendPanel.setVisible(false);
hideStyleLegend();
resetLayerStyle();
enableLayerStyle(false);
applicationBus.fireEvent(new CloseCollectionEvent(collectionID));
}
}
});
basePanel.add(checkbox);
GeoportalDataViewerServiceAsync.Util.getInstance().getCountFor(collectionID, "Published", "OK", new AsyncCallback<Integer>() {
@Override
public void onFailure(Throwable caught) {
// TODO Auto-generated method stub
}
@Override
public void onSuccess(Integer result) {
if(result!=null) {
String resultLabel = result+" project";
if(result>1) {
resultLabel+="s";
}
resultLabel+= " published";
statisticPanel.setVisible(true);
statisticPanel.add(new HTML(resultLabel));
}
}
});
ViewerConfiguration theConfig = GeoportalDataViewer.getStatus().getViewerConfig();
GCubeCollection toOpen = theConfig.getAvailableCollections().get(collectionID);
final GCubeCollection toOpen = theConfig.getAvailableCollections().get(collectionID);
// Check if indexes is empty
if (toOpen.getIndexes() == null || toOpen.getIndexes().isEmpty()) {
@ -140,6 +178,7 @@ public class LayerCollectionPanel extends Composite {
Window.alert("Cannot open collection index layer for " + toOpen.getUcd().getName() + ".");
return;
}
this.gcubeCollection = toOpen;
// TODO Get Default Index Layer
// For now we just take the first - only 1 is expected
IndexLayerDV layer = toOpen.getIndexes().get(0);
@ -147,7 +186,7 @@ public class LayerCollectionPanel extends Composite {
HashMap<String, String> ogcLinks = layer.getLayer().getOgcLinks();
final String wmsLink = ogcLinks.get("wms");
final String layerName = URLUtil.getValueOfParameter("layers", wmsLink);
this.layerName = URLUtil.getValueOfParameter("layers", wmsLink);
GeoportalDataViewerServiceAsync.Util.getInstance().parseWmsRequest(wmsLink, layerName,
new AsyncCallback<GeoInformationForWMSRequest>() {
@ -182,9 +221,7 @@ public class LayerCollectionPanel extends Composite {
GWT.log("is isToggle: " + buttonLegend.isToggle());
GWT.log("is isToggled: " + buttonLegend.isToggled());
if (legendPanel.isVisible()) {
legendPanel.clear();
legendPanel.setVisible(false);
hideStyleLegend();
} else {
legendPanel.setVisible(true);
loadLegend(wmsLink);
@ -193,11 +230,45 @@ public class LayerCollectionPanel extends Composite {
}
});
listBoxStyles.addChangeHandler(new ChangeHandler() {
@Override
public void onChange(ChangeEvent event) {
setLayerStyle();
}
});
}
});
}
private void setLayerStyle() {
UpdateLayerToMapEvent updateLayer = new UpdateLayerToMapEvent(this.gcubeCollection, this.layerName,
LAYER_TYPE.INDEX);
updateLayer.setOperation(REQUEST_PARAMETER.STYLE, listBoxStyles.getSelectedValue());
applicationBus.fireEvent(updateLayer);
if (legendPanel.isVisible()) {
legendPanel.clear();
legendPanel.setVisible(false);
}
}
private void resetLayerStyle() {
listBoxStyles.setSelectedIndex(0);
listBoxStyles.setSelectedValue(listBoxStyles.getSelectedValue());
}
private void enableLayerStyle(boolean enabled) {
listBoxStyles.setEnabled(enabled);
}
private void hideStyleLegend() {
legendPanel.clear();
legendPanel.setVisible(false);
}
/**
* Gets the checkbox.
*
@ -229,7 +300,7 @@ public class LayerCollectionPanel extends Composite {
flow.add(new HTMLPanel("Legend for: " + theLayerName));
final HorizontalPanel hpLegend = new HorizontalPanel();
String url = geoInformation.getBaseWmsServiceHost() + "?service=WMS&" + "version="
String url = geoInformation.getServiceEndPoint() + "?service=WMS&" + "version="
+ URLUtil.getValueOfParameter("version", wmsLink) + "&" + "request=GetLegendGraphic&" + "layer="
+ theLayerName;

View File

@ -10,6 +10,8 @@
<g:HTMLPanel>
<g:HTMLPanel ui:field="basePanel">
</g:HTMLPanel>
<g:HTMLPanel ui:field="statisticPanel" addStyleNames="statistic-style-panel">
</g:HTMLPanel>
<g:HTMLPanel ui:field="stylePanel" visible="false" addStyleNames="layer-style-panel">
Layer Style
<g:HorizontalPanel>

View File

@ -8,6 +8,7 @@ public class WFSMakerUtil {
public static final String CQL_FILTER_PARAMETER = "CQL_FILTER";
public static String buildWFSRequest(String webserviceURL, String layerName, int maxFeatures, String propertyName,
String cqlFilter) throws Exception {

View File

@ -65,6 +65,7 @@ import org.gcube.application.geoportalcommon.shared.geoportal.ucd.HandlerDeclara
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.UseCaseDescriptorDV;
import org.gcube.application.geoportalcommon.shared.geoportal.view.ProjectView;
import org.gcube.application.geoportalcommon.shared.gis.BoundsMap;
import org.gcube.application.geoportalcommon.util.StringUtil;
import org.gcube.application.geoportalcommon.util.URLParserUtil;
import org.gcube.application.geoportaldatamapper.GcubeProfilesPerUCDIdCache;
import org.gcube.application.geoportaldatamapper.Geoportal_JSON_Mapper;
@ -262,7 +263,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
public GeoInformationForWMSRequest loadGeoInfoForWmsRequest(String wmsLink, String layerName) throws Exception {
try {
WMSUrlValidator validator = new WMSUrlValidator(wmsLink, layerName);
String wmsServiceHost = validator.getWmsServiceHost();
String wmsServiceServiceEndpoint = validator.getWmsServiceEndPoint();
String validWMSRequest = validator.parseWMSRequest(true, true);
layerName = validator.getLayerName();
String versionWms = validator.getValueOfParsedWMSParameter(WmsParameters.VERSION);
@ -289,8 +290,8 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
? new ZAxis(layerZAxis.getUnits(), layerZAxis.isPositive(), layerZAxis.getValues())
: null;
return new GeoInformationForWMSRequest(wmsServiceHost, validWMSRequest, layerName, versionWms, crs,
mapWmsNotStandard, styles, styles.isNcWms(), zAxis);
return new GeoInformationForWMSRequest(wmsServiceServiceEndpoint, validWMSRequest, layerName, versionWms,
crs, mapWmsNotStandard, styles, styles.isNcWms(), zAxis);
} catch (Exception e) {
String msg = "An error occurred during wms request validation for layer: " + layerName;
LOG.error(msg, e);
@ -705,7 +706,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
GCubeSDILayer indexLayer = index.getLayer();
HashMap<String, String> ogcLinks = indexLayer.getOgcLinks();
String wmsLink = ogcLinks.get("wms");
LOG.info("wms link is {}", wmsLink);
LOG.info("wms link is {}", StringUtil.ellipsize(wmsLink, 150));
int lastCharOfthePath = wmsLink.indexOf("?");
String wmsPath = wmsLink.substring(0, lastCharOfthePath);
for (GeoServerPlatformInfoDV geoserver : indexLayer.getPlatformInfos()) {
@ -715,7 +716,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
LOG.debug("purged wmsPath from the 'workspace' is {}", wmsPath);
wmsLink = wmsPath + wmsLink.substring(lastCharOfthePath, wmsLink.length());
ogcLinks.put("wms", wmsLink);
LOG.info("wms link without {} is {}", geoserver.getWorkspace(), wmsLink);
LOG.info("wms link without {} is {}", geoserver.getWorkspace(), StringUtil.ellipsize(wmsLink, 150));
}
}
return index;
@ -863,7 +864,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
*/
@Override
protected void onBeforeRequestDeserialized(String serializedRequest) {
LOG.info("onBeforeRequestDeserialized called");
LOG.debug("onBeforeRequestDeserialized called");
String scope = "";
try {
@ -1862,4 +1863,19 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
return HTTPRequestUtil.getResponse(url);
}
@Override
public Integer getCountFor(String profileID, String phase, String status) {
LOG.debug("getCountFor profileID: " + profileID + ", phase: " + phase + ", status: " + status + "called");
Integer integer = null;
try {
new GeoportalServiceIdentityProxy(this.getThreadLocalRequest());
integer = GeoportalClientCaller.projects().getCountByPhaseFor(profileID, phase, status);
LOG.info("getCountFor profileID: " + profileID + ", phase: " + phase + ", status: " + status
+ " returning: " + integer);
} catch (Exception e) {
LOG.error("Error occurred in getCountFor for profileID: " + profileID, e);
}
return integer;
}
}

View File

@ -61,8 +61,8 @@ public class GisMakers {
public static String buildWFSFeatureQuery(LayerItem layerItem, String mapSrsName, BoundsMap mapBBOX,
int maxFeatures, String outputFormat) {
String link = layerItem.getMapServerHost();
LOG.debug("Map server host URL: " + link);
String link = layerItem.getMapServerEndpoint();
LOG.debug("Map server endpoint: " + link);
LOG.debug("CQL filter is: " + layerItem.getCqlFilter());
LOG.debug("MAX FEATURES: " + maxFeatures);
LOG.debug("BBOX: " + mapBBOX);

View File

@ -24,7 +24,7 @@ public class WMSUrlValidator {
private static final String OWS = "ows";
private HashMap<String, String> parametersValue = new HashMap<String, String>();
private String wmsRequestURI;
private String wmsServiceHost;
private String wmsServiceEndPoint;
private String layerName;
private String wmsNoStandardParameters = "";
@ -48,34 +48,29 @@ public class WMSUrlValidator {
throw new Exception("WMS request is null or empty");
this.wmsRequestURI = wmsRequest.trim();
boolean isOwsService = GeoWmsServiceUtility.isOWSSerice(this.wmsRequestURI);
WebMapServerHost webMapServerHost;
// IS WMS?
if (GeoWmsServiceUtility.isWMSService(wmsRequestURI)) {
LOG.trace("found " + GeoWmsServiceUtility.SERVICE_WMS + " in wms request: " + wmsRequestURI);
webMapServerHost = getWebMapServerHost(wmsRequestURI);
} else
throw new Exception("WMS service not found for layer: " + inputLayerName);
// VALIDATION WMS
String baseWmsService = webMapServerHost.getHost();
// IS OWS OR WMS?
this.wmsServiceHost = appendWmsServiceToBaseUrl(wmsRequest.substring(0, wmsRequest.indexOf("?")), isOwsService);
this.layerName = inputLayerName;
int endpointLastCharIndex = wmsRequest.lastIndexOf("?");
// No '?' char found
if (endpointLastCharIndex == -1) {
LOG.info("Char '?' not found, setting last index the end of the URI");
endpointLastCharIndex = wmsRequest.length();
}
String readWMSServiceEndpoint = wmsRequest.substring(0, endpointLastCharIndex);
this.wmsServiceEndPoint = readWMSServiceEndpoint;
try {
// VALIDATE WMS SERVICE FOR WEB MAP SERVER
if (!HttpRequestUtil.urlExists(this.wmsServiceHost, true)) {
LOG.info("baseWmsServiceUrl: " + wmsServiceHost
+ " is not a geoserver, setting as input base wms server: " + baseWmsService);
this.wmsServiceHost = baseWmsService;
if (!HttpRequestUtil.urlExists(this.wmsServiceEndPoint, true)) {
LOG.warn("baseWmsServiceUrl: " + wmsServiceEndPoint + " is not valid URL!!");
this.wmsServiceEndPoint = readWMSServiceEndpoint;
}
} catch (Exception e) {
LOG.error("error on validating geoserver wms service: " + e);
LOG.info("setting baseWmsService as input base wms server: " + baseWmsService);
this.wmsServiceHost = baseWmsService;
LOG.error("Error on validating the endpoint: " + this.wmsServiceEndPoint, e);
boolean isOwsService = GeoWmsServiceUtility.isOWSSerice(this.wmsRequestURI);
LOG.info("Retrying by appending suffix WMS or WFS...");
this.wmsServiceEndPoint = appendWmsServiceToBaseUrl(readWMSServiceEndpoint, isOwsService);
}
// VALIDATION FOR THREDDS - FIND LAYER NAME INTO WMS PATH
@ -86,7 +81,8 @@ public class WMSUrlValidator {
throw new Exception("Layer name is null or empty");
}
LOG.info("WMSURLValidator found endpoint: " + wmsServiceEndPoint);
parametersValue.put(WmsParameters.LAYERS.getParameter(), this.layerName);
}
@ -230,13 +226,13 @@ public class WMSUrlValidator {
}
/**
* Gets the wms service host.
* Gets the wms service end point.
*
* @return the wms service host
* @return the wms service end point
*/
public String getWmsServiceHost() {
public String getWmsServiceEndPoint() {
return wmsServiceHost;
return wmsServiceEndPoint;
}
/**

View File

@ -36,7 +36,7 @@ public class LayerItem implements Serializable, Cloneable {
private String url;
/** The base map server URL. */
private String mapServerHost;
private String mapServerEndpoint;
/** The style. */
private String style;
@ -774,21 +774,21 @@ public class LayerItem implements Serializable, Cloneable {
}
/**
* Gets the map server host.
* Gets the map server endpoint.
*
* @return the map server host
* @return the map server endpoint
*/
public String getMapServerHost() {
return mapServerHost;
public String getMapServerEndpoint() {
return mapServerEndpoint;
}
/**
* Sets the map server host.
*
* @param mapServerHost the new map server host
* @param mapServerEndpoint the new map server host
*/
public void setMapServerHost(String mapServerHost) {
this.mapServerHost = mapServerHost;
public void setMapServerHost(String mapServerEndpoint) {
this.mapServerEndpoint = mapServerEndpoint;
}
/**
@ -881,6 +881,11 @@ public class LayerItem implements Serializable, Cloneable {
return maxResolution;
}
/**
* To string.
*
* @return the string
*/
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
@ -890,8 +895,8 @@ public class LayerItem implements Serializable, Cloneable {
builder.append(title);
builder.append(", url=");
builder.append(url);
builder.append(", mapServerHost=");
builder.append(mapServerHost);
builder.append(", mapServerEndpoint=");
builder.append(mapServerEndpoint);
builder.append(", style=");
builder.append(style);
builder.append(", isTrasparent=");

View File

@ -8,15 +8,14 @@ import java.util.HashMap;
*
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
*
* Oct 27, 2020
* Oct 27, 2020
*/
public class GeoInformationForWMSRequest implements Serializable {
/** The Constant serialVersionUID. */
private static final long serialVersionUID = -6846636281073641003L;
/** The base wms service host. */
private String baseWmsServiceHost;
private String serviceEndPoint;
/** The wms request. */
private String wmsRequest;
@ -53,20 +52,19 @@ public class GeoInformationForWMSRequest implements Serializable {
/**
* Instantiates a new geo information for wms request.
*
* @param baseWmsServiceHost the base wms service host
* @param wmsRequest the wms request
* @param layerName the layer name
* @param versionWms the version wms
* @param crs the crs
* @param mapWmsNoStandard the map wms not standard
* @param styles the layer styles
* @param isNcWMS the is nc WMS
* @param zAxis the z axis
* @param serviceEndPoint the base wms service host
* @param wmsRequest the wms request
* @param layerName the layer name
* @param versionWms the version wms
* @param crs the crs
* @param mapWmsNoStandard the map wms not standard
* @param styles the layer styles
* @param isNcWMS the is nc WMS
* @param zAxis the z axis
*/
public GeoInformationForWMSRequest(String baseWmsServiceHost, String wmsRequest, String layerName,
String versionWms, String crs, HashMap<String, String> mapWmsNoStandard, Styles styles, boolean isNcWMS,
ZAxis zAxis) {
this.baseWmsServiceHost = baseWmsServiceHost;
public GeoInformationForWMSRequest(String serviceEndPoint, String wmsRequest, String layerName, String versionWms,
String crs, HashMap<String, String> mapWmsNoStandard, Styles styles, boolean isNcWMS, ZAxis zAxis) {
this.serviceEndPoint = serviceEndPoint;
this.wmsRequest = wmsRequest;
this.layerName = layerName;
this.versionWMS = versionWms;
@ -98,13 +96,21 @@ public class GeoInformationForWMSRequest implements Serializable {
}
/**
* Gets the base wms service host.
* Gets the service end point.
*
* @return the baseWmsServiceHost
* @return the service end point
*/
public String getBaseWmsServiceHost() {
public String getServiceEndPoint() {
return serviceEndPoint;
}
return baseWmsServiceHost;
/**
* Sets the service end point.
*
* @param serviceEndPoint the new service end point
*/
public void setServiceEndPoint(String serviceEndPoint) {
this.serviceEndPoint = serviceEndPoint;
}
/**
@ -180,11 +186,11 @@ public class GeoInformationForWMSRequest implements Serializable {
/**
* Sets the base wms service host.
*
* @param baseWmsServiceHost the baseWmsServiceHost to set
* @param baseWmsServiceHost the new base wms service host
*/
public void setBaseWmsServiceHost(String baseWmsServiceHost) {
this.baseWmsServiceHost = baseWmsServiceHost;
this.serviceEndPoint = baseWmsServiceHost;
}
/**
@ -271,8 +277,8 @@ public class GeoInformationForWMSRequest implements Serializable {
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("GeoInformationForWMSRequest [baseWmsServiceHost=");
builder.append(baseWmsServiceHost);
builder.append("GeoInformationForWMSRequest [serviceEndPoint=");
builder.append(serviceEndPoint);
builder.append(", wmsRequest=");
builder.append(wmsRequest);
builder.append(", layerName=");

View File

@ -200,7 +200,7 @@ body {
/*margin-top: 30px;*/
overflow-y: auto;
transition: width 0.5s;
z-index: 999;
z-index: 950;
}
.overlay {
@ -363,12 +363,16 @@ body {
border-radius: 20px;
}
.layers-panel {
margin-top: 10px;
.layer-panel {
margin-top: 43px;
background-color: white;
opacity: 90%;
padding: 10px;
width: 410px;
max-width: 430px;
z-index: 500;
overflow-y: auto;
position: absolute;
left: 52px;
}
.dand-layer {
@ -752,62 +756,6 @@ Table Of Contents (TOC)
padding: 20px;
}
/******************************
RESPONSIVE
*******************************/
@media all and (max-width: 2350px) {
#timeline-data {
width: 700px;
left: 550px;
}
}
@media all and (max-width: 2048px) {
#timeline-data {
width: 600px;
left: 310px;
bottom: 50px
}
.details-panel {
width: 600px;
}
}
@media all and (max-width: 1024px) {
#timeline-data {
width: 260px;
left: 140px;
bottom: 50px
}
.details-panel {
width: 400px;
}
.search-facility {
width: 250px;
max-width: 300px;
}
.inner-toolbar {
width: 100px;
}
}
@media all and (max-height: 900px) {
.ol-popup{
min-width: 150px;
max-width: 150px;
max-height: 150px;
overflow-y: scroll;
}
.ol-popup img {
width: 100%;
max-width: 150px;
}
}
/* OPEN COLLECTION UI */
.open-collection-style {
padding-left: 10px;
@ -828,6 +776,14 @@ RESPONSIVE
color: gray;
}
.statistic-style-panel {
margin-left: 25px;
font-size: 13px;
color: gray;
font-weight: bold;
margin-top: -3px;
}
.layer-style-panel-table-legend table td {
padding-left: 5px;
}
@ -897,3 +853,89 @@ RESPONSIVE
.opacity-09 {
opacity: 0.9;
}
/******************************
RESPONSIVE
*******************************/
@media all and (max-width: 2350px) {
#timeline-data {
width: 700px;
left: 550px;
}
}
@media all and (max-width: 2048px) {
#timeline-data {
width: 600px;
left: 310px;
bottom: 50px
}
.details-panel {
width: 530px;
}
}
@media all and (max-width: 1601px) {
.layers-panel {
width: 350px;
}
.dand-layer {
width: 336px;
}
.thePopDataTable {
}
.search-facility {
max-width: 680px;
}
.search-field {
width: 97%;
}
.ol-popup {
min-width: 220px;
width: 220px;
}
.thePopDataTable tr:last-of-type {
display: none;
}
.layer-panel {
width: 355px;
}
}
@media all and (max-width: 1024px) {
#timeline-data {
width: 260px;
left: 140px;
bottom: 50px
}
.details-panel {
width: 400px;
}
.search-facility {
/*width: 250px;
max-width: 300px;*/
}
.inner-toolbar {
/*width: 100px;*/
}
}
@media all and (max-height: 900px) {
.ol-popup{
min-width: 150px;
max-width: 150px;
max-height: 150px;
overflow-y: scroll;
}
.ol-popup img {
width: 100%;
max-width: 150px;
}
}
/******************************
END RESPONSIVE
*******************************/

View File

@ -10,10 +10,10 @@
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link
href="//cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@main/dist/en/v6.4.3/css/ol.css"
href="//cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@main/dist/en/v6.6.1/css/ol.css"
rel="stylesheet" type="text/css">
<script
src="//cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@main/dist/en/v6.4.3/build/ol.js"
src="//cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@main/dist/en/v6.6.1/build/ol.js"
type="text/javascript"></script>
<link
@ -138,6 +138,7 @@
application to display correctly.</div>
</noscript>
<div id="app-notifier" class="app-notifier"></div>
<div id="layer-viewer" class="layer-panel"></div>
<div id="geoportal-data-viewer"></div>
<div class="timeline-container">
<div id="timeline-data"></div>

View File

@ -15,11 +15,11 @@
src='<%=request.getContextPath()%>/GeoportalDataViewer/js/bootstrap.min.js'></script>
<link
href="//cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@main/dist/en/v6.4.3/css/ol.css"
href="//cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@main/dist/en/v6.6.1/css/ol.css"
rel="stylesheet" type="text/css">
<script
src="//cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@main/dist/en/v6.4.3/build/ol.js"
src="//cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@main/dist/en/v6.6.1/build/ol.js"
type="text/javascript"></script>
<link
@ -111,6 +111,7 @@
</script>
<div id="app-notifier" class="app-notifier"></div>
<div id="layer-viewer" class="layer-panel"></div>
<div id="geoportal-data-viewer"></div>
<div class="timeline-container">
<div id="timeline-data"></div>