Added the layer UUID read from query string
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/gis-viewer-app@122653 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
a2311fcdf8
commit
c59e83603f
|
@ -3,9 +3,6 @@
|
|||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<dependent-module archiveName="geo-utility-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geo-utility/geo-utility">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="gis-viewer-3.10.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gis-viewer-TRUNK/gis-viewer-TRUNK">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
*/
|
||||
package org.gcube.portlets.user.gisviewerapp.client;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.gcube.portlets.user.gisviewer.client.Constants;
|
||||
import org.gcube.portlets.user.gisviewer.client.DataPanelOpenListener;
|
||||
import org.gcube.portlets.user.gisviewer.client.GisViewerPanel;
|
||||
|
@ -120,21 +118,18 @@ public class ApplicationController {
|
|||
rootPanel.add(mainPanel);
|
||||
|
||||
String wmsRequest = Window.Location.getParameter(ConstantGisViewerApp.GET_WMS_PARAMETER);
|
||||
ConstantGisViewerApp.logger.log(Level.INFO, ConstantGisViewerApp.GET_WMS_PARAMETER+ " is "+wmsRequest);
|
||||
String uuid = Window.Location.getParameter(ConstantGisViewerApp.GET_UUID_PARAMETER);
|
||||
GWT.log(ConstantGisViewerApp.GET_WMS_PARAMETER+ " = "+wmsRequest);
|
||||
GWT.log(ConstantGisViewerApp.GET_UUID_PARAMETER+ " = "+uuid);
|
||||
// String replacement = Window.Location.getParameter(ConstantGisViewerApp.WMS_PARAM_SEPARATOR_REPLACEMENT_KEY);
|
||||
// ConstantGisViewerApp.logger.log(Level.INFO, ConstantGisViewerApp.WMS_PARAM_SEPARATOR_REPLACEMENT_KEY+ " is "+replacement);
|
||||
|
||||
if(wmsRequest!=null && !wmsRequest.isEmpty()){
|
||||
|
||||
// if(replacement!=null && !replacement.isEmpty()){
|
||||
// ConstantGisViewerApp.logger.log(Level.INFO, "Replacing all "+replacement);
|
||||
// wmsRequest = wmsRequest.replaceAll(replacement, wmsRequest);
|
||||
// }
|
||||
|
||||
try {
|
||||
wmsRequestConverter.addRequestToGisViewer(wmsRequest,null);
|
||||
wmsRequestConverter.addRequestToGisViewer(wmsRequest,null, uuid);
|
||||
} catch (Exception e) {
|
||||
ConstantGisViewerApp.logger.log(Level.INFO, "An error occurred on adding wmsrequest :"+wmsRequest);
|
||||
GWT.log("An error occurred on adding wmsrequest :"+wmsRequest);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.gcube.portlets.user.gisviewerapp.client;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
|
@ -14,9 +13,9 @@ public class ConstantGisViewerApp {
|
|||
|
||||
public static final String GIS_VIEWER_APP = "Gis Viewer App";
|
||||
public static final String GET_WMS_PARAMETER = "wmsrequest";
|
||||
public static final String GET_UUID_PARAMETER = "uuid";
|
||||
public static final String WMS_PARAM_SEPARATOR_REPLACEMENT_KEY = "separtor";
|
||||
|
||||
public static final Logger logger = Logger.getLogger("GisViewerApp");
|
||||
// public static final Logger logger = Logger.getLogger("GisViewerApp");
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -40,14 +40,16 @@ public class WmsRequestConverter {
|
|||
this.gisViewer = gisViewerPanel;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Parses the request.
|
||||
* Adds the request to gis viewer.
|
||||
*
|
||||
* @param wmsRequest the wms request
|
||||
* @param displayName the display name
|
||||
* @param layerUUID the layer uuid
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
public void addRequestToGisViewer(String wmsRequest, String displayName) throws Exception{
|
||||
public void addRequestToGisViewer(String wmsRequest, String displayName, String layerUUID) throws Exception{
|
||||
this.wmsRequest = wmsRequest;
|
||||
|
||||
//FIND BASE URL
|
||||
|
@ -62,7 +64,7 @@ public class WmsRequestConverter {
|
|||
|
||||
String layerName = WmsUrlValidator.getValueOfParameter(WmsParameters.LAYERS, wmsRequest);
|
||||
displayName= displayName==null || displayName.isEmpty()?layerName:"No Title";
|
||||
gisViewer.addLayerByWmsRequest(displayName, layerName, wmsRequest, isBase, displayInLayerSwitcher, "", onTop);
|
||||
gisViewer.addLayerByWmsRequest(displayName, layerName, wmsRequest, isBase, displayInLayerSwitcher, layerUUID, onTop);
|
||||
|
||||
/*GisViewerAppServiceAsync.Util.getInstance().getParametersForWmsRequest(wmsRequest, displayName, new AsyncCallback<GeoInformation>() {
|
||||
|
||||
|
@ -99,6 +101,8 @@ public class WmsRequestConverter {
|
|||
|
||||
|
||||
/**
|
||||
* Gets the wms request.
|
||||
*
|
||||
* @return the wmsRequest
|
||||
*/
|
||||
public String getWmsRequest() {
|
||||
|
|
Loading…
Reference in New Issue