Improved CQL filtering. Now is working in combination with SEARCH and
CROSS_Filtering
This commit is contained in:
parent
a28d2433a0
commit
e73c3a0202
|
@ -25,8 +25,8 @@ import org.gcube.portlets.user.geoportaldataviewer.client.events.AddLayerToMapEv
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.events.AddedLayerToMapEvent;
|
import org.gcube.portlets.user.geoportaldataviewer.client.events.AddedLayerToMapEvent;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.events.AddedLayerToMapEvent.LAYER_TYPE;
|
import org.gcube.portlets.user.geoportaldataviewer.client.events.AddedLayerToMapEvent.LAYER_TYPE;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.events.AddedLayerToMapEventHandler;
|
import org.gcube.portlets.user.geoportaldataviewer.client.events.AddedLayerToMapEventHandler;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.events.ApplyCQLToLayerMapEvent;
|
import org.gcube.portlets.user.geoportaldataviewer.client.events.ApplyCQLToLayerOnMapEvent;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.events.ApplyCQLToLayerMapEventHandler;
|
import org.gcube.portlets.user.geoportaldataviewer.client.events.ApplyCQLToLayerOnMapEventHandler;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.events.ChangeMapLayerEvent;
|
import org.gcube.portlets.user.geoportaldataviewer.client.events.ChangeMapLayerEvent;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.events.ChangeMapLayerEventHandler;
|
import org.gcube.portlets.user.geoportaldataviewer.client.events.ChangeMapLayerEventHandler;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.events.ClosedViewDetailsEvent;
|
import org.gcube.portlets.user.geoportaldataviewer.client.events.ClosedViewDetailsEvent;
|
||||||
|
@ -59,6 +59,7 @@ import org.gcube.portlets.user.geoportaldataviewer.client.events.collections.Ope
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.gis.ExtentWrapped;
|
import org.gcube.portlets.user.geoportaldataviewer.client.gis.ExtentWrapped;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.gis.MapUtils;
|
import org.gcube.portlets.user.geoportaldataviewer.client.gis.MapUtils;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.gis.OpenLayerMap;
|
import org.gcube.portlets.user.geoportaldataviewer.client.gis.OpenLayerMap;
|
||||||
|
import org.gcube.portlets.user.geoportaldataviewer.client.gis.OpenLayerMap.CQL_FACILITY_ORIGIN;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.resources.GNAImages;
|
import org.gcube.portlets.user.geoportaldataviewer.client.resources.GNAImages;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.ui.GeonaDataViewMainPanel;
|
import org.gcube.portlets.user.geoportaldataviewer.client.ui.GeonaDataViewMainPanel;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.ui.cms.project.relation.TimelineManagerStatus;
|
import org.gcube.portlets.user.geoportaldataviewer.client.ui.cms.project.relation.TimelineManagerStatus;
|
||||||
|
@ -848,7 +849,7 @@ public class GeoportalDataViewer implements EntryPoint {
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
}
|
}
|
||||||
|
|
||||||
String setCqlFilter = null; // default
|
String newCqlFilter = null; // default
|
||||||
|
|
||||||
// setCqlFilter = "INTERSECTS(geom,querySingle('limiti_amministrativi:regioni','the_geom','DEN_REG=''Calabria'''));INCLUDE";
|
// setCqlFilter = "INTERSECTS(geom,querySingle('limiti_amministrativi:regioni','the_geom','DEN_REG=''Calabria'''));INCLUDE";
|
||||||
// GWT.log("HARD-CODED CQL FILTER: "+setCqlFilter);
|
// GWT.log("HARD-CODED CQL FILTER: "+setCqlFilter);
|
||||||
|
@ -864,32 +865,34 @@ public class GeoportalDataViewer implements EntryPoint {
|
||||||
cqlFilter += "'" + projectId + "',";
|
cqlFilter += "'" + projectId + "',";
|
||||||
}
|
}
|
||||||
cqlFilter = cqlFilter.substring(0, cqlFilter.length() - 1) + ")";
|
cqlFilter = cqlFilter.substring(0, cqlFilter.length() - 1) + ")";
|
||||||
setCqlFilter = cqlFilter;
|
|
||||||
|
|
||||||
olMapMng.getOLMap().setCQLFilterToWMSLayer(layerName, setCqlFilter);
|
newCqlFilter = olMapMng.getOLMap().setCQLFilterToWMSLayer(CQL_FACILITY_ORIGIN.SEARCH, layerName,
|
||||||
|
cqlFilter);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
olMapMng.getOLMap().setCQLFilterToWMSLayer(layerName, null);
|
newCqlFilter = olMapMng.getOLMap().setCQLFilterToWMSLayer(CQL_FACILITY_ORIGIN.SEARCH, layerName,
|
||||||
setCqlFilter = null; // is already null
|
null);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (searchPerformedEvent.isSearchReset()) {
|
if (searchPerformedEvent.isSearchReset()) {
|
||||||
olMapMng.getOLMap().setCQLFilterToWMSLayer(layerName, null);
|
newCqlFilter = olMapMng.getOLMap().setCQLFilterToWMSLayer(CQL_FACILITY_ORIGIN.SEARCH, layerName,
|
||||||
setCqlFilter = null; // is already null
|
null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GWT.log("New CQL Filter is: "+newCqlFilter);
|
||||||
|
|
||||||
if (layerName != null)
|
if (layerName != null)
|
||||||
layerManager.setCQLForLayerToIndexLayer(layerName, setCqlFilter);
|
layerManager.setCQLForLayerToIndexLayer(layerName, newCqlFilter);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
applicationBus.addHandler(ApplyCQLToLayerMapEvent.TYPE, new ApplyCQLToLayerMapEventHandler() {
|
applicationBus.addHandler(ApplyCQLToLayerOnMapEvent.TYPE, new ApplyCQLToLayerOnMapEventHandler() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onApplyCQL(ApplyCQLToLayerMapEvent applyCQLToLayerMapEvent) {
|
public void onApplyCQL(ApplyCQLToLayerOnMapEvent applyCQLToLayerMapEvent) {
|
||||||
GWT.log("Fired: " + applyCQLToLayerMapEvent);
|
GWT.log("Fired: " + applyCQLToLayerMapEvent);
|
||||||
|
|
||||||
if (applyCQLToLayerMapEvent != null) {
|
if (applyCQLToLayerMapEvent != null) {
|
||||||
|
@ -909,16 +912,17 @@ public class GeoportalDataViewer implements EntryPoint {
|
||||||
|
|
||||||
if (layerName != null) {
|
if (layerName != null) {
|
||||||
|
|
||||||
GWT.log("ApplyCQLToLayerMapEvent: " + layerName + ", filter : "
|
GWT.log("ApplyCQLToLayerOnMapEvent: " + layerName + ", filter : "
|
||||||
+ applyCQLToLayerMapEvent.getCqlFilterValue());
|
+ applyCQLToLayerMapEvent.getCqlFilterValue());
|
||||||
|
|
||||||
|
|
||||||
if (applyCQLToLayerMapEvent.getCqlFilterValue() == null) {
|
if (applyCQLToLayerMapEvent.getCqlFilterValue() == null) {
|
||||||
olMapMng.getOLMap().setCQLFilterToWMSLayer(layerName, null);
|
olMapMng.getOLMap().setCQLFilterToWMSLayer(CQL_FACILITY_ORIGIN.CROSS_FILTERING, layerName,
|
||||||
|
null);
|
||||||
setCqlFilter = null; // is already null
|
setCqlFilter = null; // is already null
|
||||||
} else {
|
} else {
|
||||||
setCqlFilter = applyCQLToLayerMapEvent.getCqlFilterValue();
|
setCqlFilter = applyCQLToLayerMapEvent.getCqlFilterValue();
|
||||||
olMapMng.getOLMap().setCQLFilterToWMSLayer(layerName, setCqlFilter);
|
olMapMng.getOLMap().setCQLFilterToWMSLayer(CQL_FACILITY_ORIGIN.CROSS_FILTERING, layerName,
|
||||||
|
setCqlFilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
layerManager.setCQLForLayerToIndexLayer(layerName, setCqlFilter);
|
layerManager.setCQLForLayerToIndexLayer(layerName, setCqlFilter);
|
||||||
|
|
|
@ -582,9 +582,7 @@ public class LayerManager {
|
||||||
public void setCQLForLayerToIndexLayer(String layerName, String cqlFilter) {
|
public void setCQLForLayerToIndexLayer(String layerName, String cqlFilter) {
|
||||||
LayerObject theLo = mapIndexLayerObjects.get(layerName);
|
LayerObject theLo = mapIndexLayerObjects.get(layerName);
|
||||||
if (theLo != null) {
|
if (theLo != null) {
|
||||||
boolean isCQLFilter = cqlFilter != null;
|
|
||||||
theLo.getLayerItem().setCqlFilter(cqlFilter);
|
theLo.getLayerItem().setCqlFilter(cqlFilter);
|
||||||
theLo.getLayerItem().setCqlFilterAvailable(isCQLFilter);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,8 +11,8 @@ import com.google.gwt.event.shared.GwtEvent;
|
||||||
*
|
*
|
||||||
* Nov 18, 2020
|
* Nov 18, 2020
|
||||||
*/
|
*/
|
||||||
public class ApplyCQLToLayerMapEvent extends GwtEvent<ApplyCQLToLayerMapEventHandler> {
|
public class ApplyCQLToLayerOnMapEvent extends GwtEvent<ApplyCQLToLayerOnMapEventHandler> {
|
||||||
public static Type<ApplyCQLToLayerMapEventHandler> TYPE = new Type<ApplyCQLToLayerMapEventHandler>();
|
public static Type<ApplyCQLToLayerOnMapEventHandler> TYPE = new Type<ApplyCQLToLayerOnMapEventHandler>();
|
||||||
private IndexLayerDV theIndeLayer;
|
private IndexLayerDV theIndeLayer;
|
||||||
private String cqlFilterValue;
|
private String cqlFilterValue;
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ public class ApplyCQLToLayerMapEvent extends GwtEvent<ApplyCQLToLayerMapEventHan
|
||||||
* @param theIndeLayer the the inde layer
|
* @param theIndeLayer the the inde layer
|
||||||
* @param cqlFilter the cql filter
|
* @param cqlFilter the cql filter
|
||||||
*/
|
*/
|
||||||
public ApplyCQLToLayerMapEvent(IndexLayerDV theIndeLayer, String cqlFilterValue) {
|
public ApplyCQLToLayerOnMapEvent(IndexLayerDV theIndeLayer, String cqlFilterValue) {
|
||||||
this.theIndeLayer = theIndeLayer;
|
this.theIndeLayer = theIndeLayer;
|
||||||
this.cqlFilterValue = cqlFilterValue;
|
this.cqlFilterValue = cqlFilterValue;
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ public class ApplyCQLToLayerMapEvent extends GwtEvent<ApplyCQLToLayerMapEventHan
|
||||||
* @return the associated type
|
* @return the associated type
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Type<ApplyCQLToLayerMapEventHandler> getAssociatedType() {
|
public Type<ApplyCQLToLayerOnMapEventHandler> getAssociatedType() {
|
||||||
return TYPE;
|
return TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ public class ApplyCQLToLayerMapEvent extends GwtEvent<ApplyCQLToLayerMapEventHan
|
||||||
* @param handler the handler
|
* @param handler the handler
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void dispatch(ApplyCQLToLayerMapEventHandler handler) {
|
protected void dispatch(ApplyCQLToLayerOnMapEventHandler handler) {
|
||||||
handler.onApplyCQL(this);
|
handler.onApplyCQL(this);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ public class ApplyCQLToLayerMapEvent extends GwtEvent<ApplyCQLToLayerMapEventHan
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
builder.append("ApplyCQLToLayerMapEvent [theIndeLayer=");
|
builder.append("ApplyCQLToLayerOnMapEvent [theIndeLayer=");
|
||||||
builder.append(theIndeLayer);
|
builder.append(theIndeLayer);
|
||||||
builder.append(", cqlFilterValue=");
|
builder.append(", cqlFilterValue=");
|
||||||
builder.append(cqlFilterValue);
|
builder.append(cqlFilterValue);
|
|
@ -3,18 +3,18 @@ package org.gcube.portlets.user.geoportaldataviewer.client.events;
|
||||||
import com.google.gwt.event.shared.EventHandler;
|
import com.google.gwt.event.shared.EventHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Interface ApplyCQLToLayerMapEventHandler.
|
* The Interface ApplyCQLToLayerOnMapEventHandler.
|
||||||
*
|
*
|
||||||
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||||
*
|
*
|
||||||
* May 31, 2023
|
* May 31, 2023
|
||||||
*/
|
*/
|
||||||
public interface ApplyCQLToLayerMapEventHandler extends EventHandler {
|
public interface ApplyCQLToLayerOnMapEventHandler extends EventHandler {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* On apply CQL.
|
* On apply CQL.
|
||||||
*
|
*
|
||||||
* @param applyCQLToLayerMapEvent the apply CQL to layer map event
|
* @param applyCQLToLayerMapEvent the apply CQL to layer map event
|
||||||
*/
|
*/
|
||||||
void onApplyCQL(ApplyCQLToLayerMapEvent applyCQLToLayerMapEvent);
|
void onApplyCQL(ApplyCQLToLayerOnMapEvent applyCQLToLayerMapEvent);
|
||||||
}
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
package org.gcube.portlets.user.geoportaldataviewer.client.gis;
|
package org.gcube.portlets.user.geoportaldataviewer.client.gis;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
|
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerConstants;
|
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerConstants;
|
||||||
|
@ -89,6 +90,12 @@ public abstract class OpenLayerMap {
|
||||||
|
|
||||||
public static final int MAX_ZOOM = 21;
|
public static final int MAX_ZOOM = 21;
|
||||||
|
|
||||||
|
public static enum CQL_FACILITY_ORIGIN {
|
||||||
|
SEARCH, CROSS_FILTERING
|
||||||
|
}
|
||||||
|
|
||||||
|
public HashMap<CQL_FACILITY_ORIGIN, String> cqlFilterMap = new HashMap<CQL_FACILITY_ORIGIN, String>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Click listener.
|
* Click listener.
|
||||||
*
|
*
|
||||||
|
@ -461,33 +468,51 @@ public abstract class OpenLayerMap {
|
||||||
/**
|
/**
|
||||||
* Sets the CQL filter to WMS layer.
|
* Sets the CQL filter to WMS layer.
|
||||||
*
|
*
|
||||||
* @param key the key
|
* @param origin the origin
|
||||||
* @param cqlFilterExpression the cql filter expression
|
* @param layerName the key
|
||||||
|
* @param newCQLFilterExpression the cql filter expression
|
||||||
|
* @return the new CQL Filter
|
||||||
*/
|
*/
|
||||||
public void setCQLFilterToWMSLayer(String key, String cqlFilterExpression) {
|
public String setCQLFilterToWMSLayer(CQL_FACILITY_ORIGIN origin, String layerName, String newCQLFilterExpression) {
|
||||||
|
GWT.log("Getting key (layerName): " + layerName);
|
||||||
GWT.log("Getting key: " + key);
|
GWT.log("Adding CQL FILTER: " + newCQLFilterExpression);
|
||||||
|
|
||||||
GWT.log("Setting CQL FILTER: " + cqlFilterExpression);
|
|
||||||
Image wmsLayer = wmsLayerMap.get(key);
|
|
||||||
|
|
||||||
|
Image wmsLayer = wmsLayerMap.get(layerName);
|
||||||
GWT.log("WMS layer is: " + wmsLayer);
|
GWT.log("WMS layer is: " + wmsLayer);
|
||||||
|
|
||||||
// map.removeLayer(wmsLayer);
|
|
||||||
|
|
||||||
ImageWms imageWMSSource = wmsLayer.getSource();
|
ImageWms imageWMSSource = wmsLayer.getSource();
|
||||||
ImageWmsParams imageWMSParams = imageWMSSource.getParams();
|
ImageWmsParams imageWMSParams = imageWMSSource.getParams();
|
||||||
|
|
||||||
if (cqlFilterExpression == null || cqlFilterExpression.length() > MAX_LENGHT_CQL_FOR_GET_REQUEST) {
|
// Setting new CQL filter for Origin
|
||||||
imageWMSParams.delete(CQL_FILTER_PARAMETER);
|
cqlFilterMap.put(origin, newCQLFilterExpression);
|
||||||
} else {
|
|
||||||
imageWMSParams.set(CQL_FILTER_PARAMETER, cqlFilterExpression);
|
String setCQLFilter = "";
|
||||||
|
|
||||||
|
// Building new CQL filter
|
||||||
|
for (CQL_FACILITY_ORIGIN originKey : cqlFilterMap.keySet()) {
|
||||||
|
|
||||||
|
String originCQLFilter = cqlFilterMap.get(originKey);
|
||||||
|
if (originCQLFilter != null) {
|
||||||
|
if (setCQLFilter.isEmpty()) {
|
||||||
|
setCQLFilter = originCQLFilter;
|
||||||
|
} else {
|
||||||
|
setCQLFilter += " AND " + originCQLFilter;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (setCQLFilter.isEmpty())
|
||||||
|
imageWMSParams.delete(CQL_FILTER_PARAMETER);
|
||||||
|
else
|
||||||
|
imageWMSParams.set(CQL_FILTER_PARAMETER, setCQLFilter);
|
||||||
|
|
||||||
imageWMSSource.updateParams(imageWMSParams);
|
imageWMSSource.updateParams(imageWMSParams);
|
||||||
wmsLayer.setSource(imageWMSSource);
|
wmsLayer.setSource(imageWMSSource);
|
||||||
|
|
||||||
wmsLayer.changed();
|
wmsLayer.changed();
|
||||||
|
|
||||||
|
GWT.log("returning " + CQL_FILTER_PARAMETER + ": " + setCQLFilter);
|
||||||
|
return setCQLFilter;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -56,17 +56,17 @@
|
||||||
</g:HTMLPanel>
|
</g:HTMLPanel>
|
||||||
</b:DropdownButton>
|
</b:DropdownButton>
|
||||||
<b:DropdownButton type="LINK"
|
<b:DropdownButton type="LINK"
|
||||||
title="Select the Map" text="Map" ui:field="linkMap" icon="GLOBE">
|
title="Select the base Map" text="Map" ui:field="linkMap" icon="GLOBE">
|
||||||
<g:HTMLPanel ui:field="panelBaseLayers">
|
<g:HTMLPanel ui:field="panelBaseLayers">
|
||||||
</g:HTMLPanel>
|
</g:HTMLPanel>
|
||||||
</b:DropdownButton>
|
</b:DropdownButton>
|
||||||
<b:DropdownButton type="LINK" visible="false"
|
<b:DropdownButton type="LINK" visible="false"
|
||||||
title="Custom overlay layers.." text="Overlay" ui:field="linkCustomOverlayLayers" icon="REORDER">
|
title="Add overlay layers.." text="Overlay" ui:field="linkCustomOverlayLayers" icon="REORDER">
|
||||||
<g:HTMLPanel ui:field="panelCustomOverlayLayers" addStyleNames="overlay-panel-style">
|
<g:HTMLPanel ui:field="panelCustomOverlayLayers" addStyleNames="overlay-panel-style">
|
||||||
</g:HTMLPanel>
|
</g:HTMLPanel>
|
||||||
</b:DropdownButton>
|
</b:DropdownButton>
|
||||||
<b:DropdownButton type="LINK" visible="false"
|
<b:DropdownButton type="LINK" visible="false"
|
||||||
title="Spatial filtering layers.." text="Filter" ui:field="linkCrossFilteringLayers" icon="FILTER">
|
title="Apply spatial filtering.." text="Filter" ui:field="linkCrossFilteringLayers" icon="FILTER">
|
||||||
<g:HTMLPanel ui:field="panelCrossFilteringLayers" addStyleNames="filter-panel-style">
|
<g:HTMLPanel ui:field="panelCrossFilteringLayers" addStyleNames="filter-panel-style">
|
||||||
</g:HTMLPanel>
|
</g:HTMLPanel>
|
||||||
</b:DropdownButton>
|
</b:DropdownButton>
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
</b:DropdownButton>
|
</b:DropdownButton>
|
||||||
<b:DropdownButton type="LINK"
|
<b:DropdownButton type="LINK"
|
||||||
title="Center Map to Location" text="Preset Location"
|
title="Center Map to Location" text="Preset Location"
|
||||||
ui:field="linkPresetLocation">
|
ui:field="linkPresetLocation" addStyleNames="preset-location">
|
||||||
<b:Nav>
|
<b:Nav>
|
||||||
<b:Button type="LINK" ui:field="extentToItaly"
|
<b:Button type="LINK" ui:field="extentToItaly"
|
||||||
text="Italy" title="Center to Italy"></b:Button>
|
text="Italy" title="Center to Italy"></b:Button>
|
||||||
|
|
|
@ -12,7 +12,7 @@ import org.gcube.application.geoportalcommon.shared.geoportal.materialization.GC
|
||||||
import org.gcube.application.geoportalcommon.shared.geoportal.materialization.IndexLayerDV;
|
import org.gcube.application.geoportalcommon.shared.geoportal.materialization.IndexLayerDV;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerConstants.MAP_PROJECTION;
|
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerConstants.MAP_PROJECTION;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerServiceAsync;
|
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerServiceAsync;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.events.ApplyCQLToLayerMapEvent;
|
import org.gcube.portlets.user.geoportaldataviewer.client.events.ApplyCQLToLayerOnMapEvent;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.ui.util.OLGeoJSONUtil;
|
import org.gcube.portlets.user.geoportaldataviewer.client.ui.util.OLGeoJSONUtil;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.util.LoaderIcon;
|
import org.gcube.portlets.user.geoportaldataviewer.client.util.LoaderIcon;
|
||||||
import org.gcube.portlets.user.geoportaldataviewer.client.util.URLUtil;
|
import org.gcube.portlets.user.geoportaldataviewer.client.util.URLUtil;
|
||||||
|
@ -152,7 +152,7 @@ public class CrossFilteringLayerPanel extends Composite {
|
||||||
List<ListBox> listBox = mapInnestedListBoxes.get(0);
|
List<ListBox> listBox = mapInnestedListBoxes.get(0);
|
||||||
listBox.get(0).setSelectedIndex(0);
|
listBox.get(0).setSelectedIndex(0);
|
||||||
// Resetting CQL filtering
|
// Resetting CQL filtering
|
||||||
applicationBus.fireEvent(new ApplyCQLToLayerMapEvent(gCubeCollection.getIndexes().get(0), null));
|
applicationBus.fireEvent(new ApplyCQLToLayerOnMapEvent(gCubeCollection.getIndexes().get(0), null));
|
||||||
setFilterHighLighted(false);
|
setFilterHighLighted(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -434,7 +434,7 @@ public class CrossFilteringLayerPanel extends Composite {
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
}
|
}
|
||||||
|
|
||||||
applicationBus.fireEvent(new ApplyCQLToLayerMapEvent(indexLayer, setCqlFilter));
|
applicationBus.fireEvent(new ApplyCQLToLayerOnMapEvent(indexLayer, setCqlFilter));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showCountResultsOfWFSCrossFiltering(String wfsQuery) {
|
public void showCountResultsOfWFSCrossFiltering(String wfsQuery) {
|
||||||
|
|
|
@ -23,7 +23,6 @@ import com.google.gwt.core.client.GWT;
|
||||||
*/
|
*/
|
||||||
public class LayerItem implements Serializable, Cloneable {
|
public class LayerItem implements Serializable, Cloneable {
|
||||||
|
|
||||||
|
|
||||||
/** The Constant serialVersionUID. */
|
/** The Constant serialVersionUID. */
|
||||||
private static final long serialVersionUID = 1664082688635256899L;
|
private static final long serialVersionUID = 1664082688635256899L;
|
||||||
|
|
||||||
|
@ -102,9 +101,6 @@ public class LayerItem implements Serializable, Cloneable {
|
||||||
/** The server wms request. */
|
/** The server wms request. */
|
||||||
public String wmsLink;
|
public String wmsLink;
|
||||||
|
|
||||||
/** The cql filter available. */
|
|
||||||
private boolean cqlFilterAvailable = false;
|
|
||||||
|
|
||||||
/** The uuid. */
|
/** The uuid. */
|
||||||
private String UUID;
|
private String UUID;
|
||||||
|
|
||||||
|
@ -756,16 +752,7 @@ public class LayerItem implements Serializable, Cloneable {
|
||||||
* @return true, if is cql filter available
|
* @return true, if is cql filter available
|
||||||
*/
|
*/
|
||||||
public boolean isCqlFilterAvailable() {
|
public boolean isCqlFilterAvailable() {
|
||||||
return cqlFilterAvailable;
|
return (cqlFilter != null) && (!cqlFilter.isEmpty());
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the cql filter available.
|
|
||||||
*
|
|
||||||
* @param cqlFilterAvailable the new cql filter available
|
|
||||||
*/
|
|
||||||
public void setCqlFilterAvailable(boolean cqlFilterAvailable) {
|
|
||||||
this.cqlFilterAvailable = cqlFilterAvailable;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -894,11 +881,6 @@ public class LayerItem implements Serializable, Cloneable {
|
||||||
return maxResolution;
|
return maxResolution;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* To string.
|
|
||||||
*
|
|
||||||
* @return the string
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
|
@ -952,8 +934,6 @@ public class LayerItem implements Serializable, Cloneable {
|
||||||
builder.append(isNcWms);
|
builder.append(isNcWms);
|
||||||
builder.append(", wmsLink=");
|
builder.append(", wmsLink=");
|
||||||
builder.append(wmsLink);
|
builder.append(wmsLink);
|
||||||
builder.append(", cqlFilterAvailable=");
|
|
||||||
builder.append(cqlFilterAvailable);
|
|
||||||
builder.append(", UUID=");
|
builder.append(", UUID=");
|
||||||
builder.append(UUID);
|
builder.append(UUID);
|
||||||
builder.append(", zAxis=");
|
builder.append(", zAxis=");
|
||||||
|
@ -968,7 +948,6 @@ public class LayerItem implements Serializable, Cloneable {
|
||||||
return builder.toString();
|
return builder.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To layer item.
|
* To layer item.
|
||||||
*
|
*
|
||||||
|
@ -992,7 +971,6 @@ public class LayerItem implements Serializable, Cloneable {
|
||||||
* @return the layer item
|
* @return the layer item
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
// TODO Constructor from IndexLayerDV, GCUBESDILAeryDV or direct info
|
// TODO Constructor from IndexLayerDV, GCUBESDILAeryDV or direct info
|
||||||
private LayerItem toLayerItem(LayerType layerType, String layerTitle, String layerName, String layerURL,
|
private LayerItem toLayerItem(LayerType layerType, String layerTitle, String layerName, String layerURL,
|
||||||
String mapServerHost, boolean isExternal, boolean isBase, boolean displayInLayerSwitcher,
|
String mapServerHost, boolean isExternal, boolean isBase, boolean displayInLayerSwitcher,
|
||||||
|
|
|
@ -158,6 +158,11 @@ body {
|
||||||
padding-top: 1px;
|
padding-top: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.preset-location ul a {
|
||||||
|
margin: 5px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.my-control-group .controls {
|
.my-control-group .controls {
|
||||||
margin-left: 70px !important;
|
margin-left: 70px !important;
|
||||||
}
|
}
|
||||||
|
@ -211,7 +216,7 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
.inner-toolbar .btn-group {
|
.inner-toolbar .btn-group {
|
||||||
margin-left: 0px !important;
|
margin-left: 2px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inner-toolbar .btn-link {
|
.inner-toolbar .btn-link {
|
||||||
|
@ -426,6 +431,7 @@ body {
|
||||||
.map-layers-radio label {
|
.map-layers-radio label {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue