merged with master at a6ac952994
This commit is contained in:
parent
3644685fe5
commit
3a7005728f
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -84,7 +85,8 @@
|
|||
|
||||
|
||||
<wb-module deploy-name="geoportal-data-viewer-app-3.5.0-SNAPSHOT">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -169,7 +171,8 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -254,7 +257,8 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -339,7 +343,8 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -424,7 +429,8 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -509,10 +515,11 @@
|
|||
|
||||
|
||||
<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-common-2.2.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-data-common/geoportal-data-common">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -597,7 +604,8 @@
|
|||
|
||||
|
||||
<property name="java-output-path" value="/geoportal-data-viewer-app/target/geoportal-data-viewer-app-0.0.1-SNAPSHOT/WEB-INF/classes"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -682,7 +690,8 @@
|
|||
|
||||
|
||||
<property name="context-root" value="geoportal-data-viewer-app"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -767,7 +776,8 @@
|
|||
|
||||
|
||||
</wb-module>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
|
||||
- Supported the cross-filtering [#25074]
|
||||
- Supported the grouped custom layers [#25110]
|
||||
- Managed the (WMS) Layer Style facility [#25066]
|
||||
|
||||
## [v3.4.0] - 2023-05-11
|
||||
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<artifactId>maven-parent</artifactId>
|
||||
<groupId>org.gcube.tools</groupId>
|
||||
<version>1.1.0</version>
|
||||
<version>1.2.0</version>
|
||||
<relativePath />
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
@ -947,6 +949,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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -25,7 +25,8 @@ public class GeoportalDataViewerConstants {
|
|||
public static final String GET_MAX_ZOOM_LEVEL = OpenLayersMapParameters.OL_MAP_PARAM.maxzoomlevel.name();
|
||||
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");
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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>();
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
@ -77,6 +81,12 @@ public class LayerCollectionPanel extends Composite {
|
|||
|
||||
private ListBox listBoxStyles = new ListBox();
|
||||
|
||||
private String layerName;
|
||||
|
||||
private GCubeCollection gcubeCollection;
|
||||
|
||||
private HandlerManager applicationBus;
|
||||
|
||||
/**
|
||||
* The Interface LayerCollectionPanelUiBinder.
|
||||
*
|
||||
|
@ -93,8 +103,9 @@ 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);
|
||||
|
@ -112,18 +123,16 @@ 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));
|
||||
}
|
||||
}
|
||||
|
@ -132,7 +141,7 @@ public class LayerCollectionPanel extends Composite {
|
|||
basePanel.add(checkbox);
|
||||
|
||||
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 +149,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 +157,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 +192,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 +201,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.
|
||||
*
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
Loading…
Reference in New Issue