On init - centering the map on the project without centroid feature

This commit is contained in:
Francesco Mangiacrapa 2023-01-10 14:36:37 +01:00
parent cef3b61800
commit 5e45322051
5 changed files with 46 additions and 25 deletions

View File

@ -16,6 +16,7 @@
@ -58,6 +59,7 @@
@ -97,6 +99,7 @@
@ -136,6 +139,7 @@
@ -175,6 +179,7 @@
@ -214,6 +219,7 @@
@ -233,6 +239,10 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<dependent-module archiveName="geoportal-data-common-2.0.1.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-data-common/geoportal-data-common">
<dependency-type>uses</dependency-type>
</dependent-module>
@ -292,6 +302,7 @@
@ -331,6 +342,7 @@
@ -369,6 +381,7 @@

View File

@ -4,10 +4,11 @@
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.0.1] - 2022-12-21
## [v3.0.1-SNAPSHOT] - 2022-12-21
#### Enhancement
- [#24300] Improved the GUI of the search functionality when multiple collections are available.
- [#24300] Improved the GUI of the search functionality when multiple collections are available
- Improved the user experience providing an animated map and zoom to layers facility
#### Fixes
- Reduced the BBOX when resolving a project by share link

View File

@ -14,7 +14,7 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>geoportal-data-viewer-app</artifactId>
<packaging>war</packaging>
<version>3.0.1</version>
<version>3.0.1-SNAPSHOT</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>

View File

@ -262,6 +262,12 @@ public class LayerManager {
// list of
// FeatureRow
if (theFeatures == null || theFeatures.isEmpty()) {
// means that another version of the project has been passed without
// features
// stored into centroid layers.
// so centering the map on the centroid passed into query and stored
// into project metadata
olMap.setCenter(queryEvent.getQueryClickExtent().getCenter());
return;
}
}
@ -807,8 +813,9 @@ public class LayerManager {
@Override
public void onBrowserEvent(Event event) {
if (Event.ONCLICK == event.getTypeInt()) {
applicationBus.fireEvent(new ShowDetailsEvent(lo.getType().name(),
lo.getProfileID(), newProjectID, null, true, EVENT_SOURCE.OPEN_PROJECTS));
applicationBus.fireEvent(
new ShowDetailsEvent(lo.getType().name(), lo.getProfileID(),
newProjectID, null, true, EVENT_SOURCE.OPEN_PROJECTS));
}
}

View File

@ -752,7 +752,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
try {
SessionUtil.getCurrentUser(this.getThreadLocalRequest()).getUsername();
} catch (Exception e) {
LOG.info("User not found in session, the userName for cecking policy will be null");
LOG.info("User not found in session, the userName for checking policy will be null");
}
LOG.info("Trying to get project for id " + profileID);
@ -807,7 +807,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
try {
SessionUtil.getCurrentUser(this.getThreadLocalRequest()).getUsername();
} catch (Exception e) {
LOG.info("User not found in session, the userName for cecking policy will be null");
LOG.info("User not found in session, the userName for checking the policy will be null");
}
LOG.info("Trying to get project for id " + profileID);
@ -856,7 +856,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
try {
userName = SessionUtil.getCurrentUser(this.getThreadLocalRequest()).getUsername();
} catch (Exception e) {
LOG.info("User not found in session, the userName for cecking policy will be null");
LOG.info("User not found in session, the userName for checking the policy will be null");
}
LOG.info("Trying to get project for id " + profileID);
@ -920,7 +920,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
try {
userName = SessionUtil.getCurrentUser(this.getThreadLocalRequest()).getUsername();
} catch (Exception e) {
LOG.info("User not found in session, the userName for cecking policy will be null");
LOG.info("User not found in session, the userName for checking the policy will be null");
}
LOG.info("Trying to get project for id " + profileID);