|
|
|
@ -57,6 +57,7 @@ import com.google.gwt.user.client.EventListener;
|
|
|
|
|
import com.google.gwt.user.client.Window;
|
|
|
|
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
|
|
|
|
import com.google.gwt.user.client.ui.FlexTable;
|
|
|
|
|
import com.google.gwt.user.client.ui.FlowPanel;
|
|
|
|
|
import com.google.gwt.user.client.ui.HTML;
|
|
|
|
|
import com.google.gwt.user.client.ui.ScrollPanel;
|
|
|
|
|
import com.google.gwt.user.client.ui.VerticalPanel;
|
|
|
|
@ -147,16 +148,15 @@ public class LayerManager {
|
|
|
|
|
GWT.log("MAX_WFS_FEATURES is: " + GeoportalDataViewerConstants.MAX_WFS_FEATURES);
|
|
|
|
|
// GeoportalDataViewerConstants.print("calling getDataResult");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<LayerObject> listLO = new ArrayList<LayerObject>();
|
|
|
|
|
//for querying base layers
|
|
|
|
|
// for querying base layers
|
|
|
|
|
listLO.addAll(mapBaseLayerObjects.values());
|
|
|
|
|
|
|
|
|
|
//for querying detail layers only in this case
|
|
|
|
|
if(olMap.getCurrentResolution()<OLMapManager.LAYER_DETAIL_MAX_RESOLUTION) {
|
|
|
|
|
|
|
|
|
|
// for querying detail layers only in this case
|
|
|
|
|
if (olMap.getCurrentResolution() < OLMapManager.LAYER_DETAIL_MAX_RESOLUTION) {
|
|
|
|
|
listLO.addAll(mapDetailLayerObjects.values());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GeoportalDataViewerServiceAsync.Util.getInstance().getDataResult(listLO, olMap.getProjectionCode(),
|
|
|
|
|
mapBBOX, GeoportalDataViewerConstants.MAX_WFS_FEATURES, olMap.getCurrentZoomLevel(),
|
|
|
|
|
new AsyncCallback<List<GeoNaSpatialQueryResult>>() {
|
|
|
|
@ -171,7 +171,7 @@ public class LayerManager {
|
|
|
|
|
public void onSuccess(List<GeoNaSpatialQueryResult> listGeonaDataObjects) {
|
|
|
|
|
|
|
|
|
|
GWT.log("GeoNaDataObject's is/are " + listGeonaDataObjects.size());
|
|
|
|
|
//GWT.log("GeoNaDataObject's: " + listGeonaDataObjects);
|
|
|
|
|
// GWT.log("GeoNaDataObject's: " + listGeonaDataObjects);
|
|
|
|
|
// GeoportalDataViewerConstants.print("GeoNaDataObject's:
|
|
|
|
|
// "+listGeonaDataObjects);
|
|
|
|
|
|
|
|
|
@ -179,7 +179,7 @@ public class LayerManager {
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
FeatureRow feature = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MapEventType sourceEvent = queryEvent.getSourceMapEventType();
|
|
|
|
|
|
|
|
|
|
// TODO SWTCH FOR EARCH ITEM TYPE
|
|
|
|
@ -223,11 +223,10 @@ public class LayerManager {
|
|
|
|
|
// to a record/concessione (not centroid layer),
|
|
|
|
|
// so calling show popuup info on detail layers if the
|
|
|
|
|
// following events are true.
|
|
|
|
|
if (sourceEvent
|
|
|
|
|
.equals(MapEventType.MOUSE_CLICK)
|
|
|
|
|
&& olMap.getCurrentZoomLevel() > OLMapManager.QUERY_MIN_ZOOM_LEVEL) {
|
|
|
|
|
|
|
|
|
|
//Here I need to pass only the visible layers
|
|
|
|
|
if (sourceEvent.equals(MapEventType.MOUSE_CLICK) && olMap
|
|
|
|
|
.getCurrentZoomLevel() > OLMapManager.QUERY_MIN_ZOOM_LEVEL) {
|
|
|
|
|
|
|
|
|
|
// Here I need to pass only the visible layers
|
|
|
|
|
showPopupInfoForLayer(listGeonaDataObjects,
|
|
|
|
|
queryEvent.getQueryClickExtent());
|
|
|
|
|
}
|
|
|
|
@ -244,8 +243,8 @@ public class LayerManager {
|
|
|
|
|
|
|
|
|
|
GWT.log("the product id is: " + theProductId);
|
|
|
|
|
// Displaying popup info for centroid layer
|
|
|
|
|
if (sourceEvent
|
|
|
|
|
.equals(MapEventType.MOUSE_CLICK) || sourceEvent.equals(MapEventType.ADDED_CENTROID_LAYER_TO_MAP)){
|
|
|
|
|
if (sourceEvent.equals(MapEventType.MOUSE_CLICK)
|
|
|
|
|
|| sourceEvent.equals(MapEventType.ADDED_CENTROID_LAYER_TO_MAP)) {
|
|
|
|
|
showPopupInfoForCentroidLayer(geoNaDataObject, feature,
|
|
|
|
|
queryEvent.getQueryClickExtent().getCenter());
|
|
|
|
|
}
|
|
|
|
@ -271,7 +270,8 @@ public class LayerManager {
|
|
|
|
|
layer.getLayerName(), layer.getWmsLink(),
|
|
|
|
|
false, false, layer.getLayerUUID(), true,
|
|
|
|
|
OLMapManager.LAYER_DETAIL_MIN_RESOLUTION,
|
|
|
|
|
OLMapManager.LAYER_DETAIL_MAX_RESOLUTION,layer.getRefersTo());
|
|
|
|
|
OLMapManager.LAYER_DETAIL_MAX_RESOLUTION,
|
|
|
|
|
layer.getRefersTo());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -308,7 +308,7 @@ public class LayerManager {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void removeAllDetailLayers() {
|
|
|
|
|
mapDetailLayerObjects.clear();
|
|
|
|
|
olMap.removeAllDetailLayers();
|
|
|
|
@ -343,21 +343,22 @@ public class LayerManager {
|
|
|
|
|
/**
|
|
|
|
|
* Adds the layer.
|
|
|
|
|
*
|
|
|
|
|
* @param geonaItemType the geona item type
|
|
|
|
|
* @param layerTitle the layer title
|
|
|
|
|
* @param layerName the layer name
|
|
|
|
|
* @param wmsLink the wms link
|
|
|
|
|
* @param isBase the is base
|
|
|
|
|
* @param displayInLayerSwitcher the display in layer switcher
|
|
|
|
|
* @param UUID the uuid
|
|
|
|
|
* @param asDetailLayer the as detail layer
|
|
|
|
|
* @param minResolution the min resolution
|
|
|
|
|
* @param maxResolution the max resolution
|
|
|
|
|
* @param geonaItemType the geona item type
|
|
|
|
|
* @param layerTitle the layer title
|
|
|
|
|
* @param layerName the layer name
|
|
|
|
|
* @param wmsLink the wms link
|
|
|
|
|
* @param isBase the is base
|
|
|
|
|
* @param displayInLayerSwitcher the display in layer switcher
|
|
|
|
|
* @param UUID the uuid
|
|
|
|
|
* @param asDetailLayer the as detail layer
|
|
|
|
|
* @param minResolution the min resolution
|
|
|
|
|
* @param maxResolution the max resolution
|
|
|
|
|
* @param refersToBaseConcessione the refers to base concessione
|
|
|
|
|
*/
|
|
|
|
|
public void addLayer(final String geonaItemType, final String layerTitle, final String layerName,
|
|
|
|
|
final String wmsLink, final boolean isBase, final boolean displayInLayerSwitcher, final String UUID,
|
|
|
|
|
final boolean asDetailLayer, Double minResolution, Double maxResolution, BaseConcessioneDV refersToBaseConcessione) {
|
|
|
|
|
final boolean asDetailLayer, Double minResolution, Double maxResolution,
|
|
|
|
|
BaseConcessioneDV refersToBaseConcessione) {
|
|
|
|
|
|
|
|
|
|
// final LayoutContainer westPanel = (LayoutContainer) layersPanel.getParent();
|
|
|
|
|
//
|
|
|
|
@ -398,30 +399,30 @@ public class LayerManager {
|
|
|
|
|
displayInLayerSwitcher, (ArrayList<String>) geoInfoWMS.getStyles().getGeoStyles(),
|
|
|
|
|
geoInfoWMS.getWmsRequest(), false, geoInfoWMS.getMapWMSNoStandard(),
|
|
|
|
|
geoInfoWMS.isNcWMS(), UUID, geoInfoWMS.getZAxis(), minResolution, maxResolution);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LayerObject lo = new LayerObject();
|
|
|
|
|
lo.setLayerItem(layerItem);
|
|
|
|
|
lo.setItemType(geonaItemType);
|
|
|
|
|
lo.setSourceConcessione(refersToBaseConcessione);
|
|
|
|
|
|
|
|
|
|
String key = layerItem.getName(); //should be unique
|
|
|
|
|
//layerObjects.put(key, lo);
|
|
|
|
|
|
|
|
|
|
if(!asDetailLayer) {
|
|
|
|
|
//is a base layer
|
|
|
|
|
String key = layerItem.getName(); // should be unique
|
|
|
|
|
// layerObjects.put(key, lo);
|
|
|
|
|
|
|
|
|
|
if (!asDetailLayer) {
|
|
|
|
|
// is a base layer
|
|
|
|
|
LayerObject blo = mapBaseLayerObjects.get(key);
|
|
|
|
|
if(blo==null) {
|
|
|
|
|
if (blo == null) {
|
|
|
|
|
olMap.addWMSLayer(layerItem);
|
|
|
|
|
mapBaseLayerObjects.put(key, lo);
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
GWT.log("Skipping base layer " + key + " already added to Map");
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
LayerObject dlo = mapDetailLayerObjects.get(key);
|
|
|
|
|
if(dlo==null) {
|
|
|
|
|
if (dlo == null) {
|
|
|
|
|
mapDetailLayerObjects.put(key, lo);
|
|
|
|
|
olMap.addWMSDetailLayer(layerItem);
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
GWT.log("Skipping detail layer " + key + " already added to Map");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -520,98 +521,210 @@ public class LayerManager {
|
|
|
|
|
* @param feature the feature
|
|
|
|
|
* @param onFailureCenterTo the on failure center to
|
|
|
|
|
*/
|
|
|
|
|
public void showPopupInfoForLayer(List<GeoNaSpatialQueryResult> listGeoNaDataObject,
|
|
|
|
|
ExtentWrapped queryClick) {
|
|
|
|
|
|
|
|
|
|
public void showPopupInfoForLayer(List<GeoNaSpatialQueryResult> listGeoNaDataObject, ExtentWrapped queryClick) {
|
|
|
|
|
|
|
|
|
|
ScrollPanel scrollPanel = new ScrollPanel();
|
|
|
|
|
VerticalPanel vpPanel = new VerticalPanel();
|
|
|
|
|
scrollPanel.add(vpPanel);
|
|
|
|
|
|
|
|
|
|
FlowPanel flowPanel = new FlowPanel();
|
|
|
|
|
scrollPanel.add(flowPanel);
|
|
|
|
|
|
|
|
|
|
String prevConcessioneName = "";
|
|
|
|
|
for (GeoNaSpatialQueryResult geoNaSpatialQueryResult : listGeoNaDataObject) {
|
|
|
|
|
|
|
|
|
|
GWT.log("baseLayerFromISProfile.getName() :"+baseLayerFromISProfile.getName());
|
|
|
|
|
LayerObject lo = geoNaSpatialQueryResult.getSourceLayerObject();
|
|
|
|
|
LayerItem sourceLI = lo.getLayerItem();
|
|
|
|
|
|
|
|
|
|
String layerSourceName = sourceLI.getName();
|
|
|
|
|
|
|
|
|
|
//skipping centroid layer
|
|
|
|
|
if(layerSourceName==null || layerSourceName.compareToIgnoreCase(baseLayerFromISProfile.getName())==0) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String nomeConcessione = lo.getSourceConcessione().getNome();
|
|
|
|
|
if(prevConcessioneName.compareTo(nomeConcessione)!=0) {
|
|
|
|
|
String concessioneIntro = StringUtil.ellipsize(lo.getSourceConcessione().getNome(), 40);
|
|
|
|
|
Heading heading = new Heading(4, concessioneIntro);
|
|
|
|
|
heading.getElement().getStyle().setMarginBottom(10, Unit.PX);
|
|
|
|
|
vpPanel.add(heading);
|
|
|
|
|
HTML subText = new HTML("<p style=\"color:#999; font-size:14px; margin:5px 0 5px 0;\">Layers and Properties</p>");
|
|
|
|
|
vpPanel.add(subText);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
prevConcessioneName = nomeConcessione;
|
|
|
|
|
|
|
|
|
|
Label layerLabel = new Label();
|
|
|
|
|
layerLabel.setType(LabelType.INFO);
|
|
|
|
|
|
|
|
|
|
layerLabel.setText(layerSourceName);
|
|
|
|
|
layerLabel.getElement().getStyle().setMarginTop(10, Unit.PX);
|
|
|
|
|
layerLabel.getElement().getStyle().setMarginBottom(5, Unit.PX);
|
|
|
|
|
vpPanel.add(layerLabel);
|
|
|
|
|
|
|
|
|
|
List<FeatureRow> features = geoNaSpatialQueryResult.getFeatures();
|
|
|
|
|
|
|
|
|
|
if (features == null || features.isEmpty()) {
|
|
|
|
|
FlexTable flex = new FlexTable();
|
|
|
|
|
flex.setCellPadding(1);
|
|
|
|
|
flex.setCellSpacing(1);
|
|
|
|
|
flex.getElement().addClassName("table-feature");
|
|
|
|
|
flex.setHTML(0, 0, new HTML("No data available").toString());
|
|
|
|
|
vpPanel.add(flex);
|
|
|
|
|
continue;
|
|
|
|
|
//olMap.showPopup(vpPanel.toString(), onFailureCenterTo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (FeatureRow feature : features) {
|
|
|
|
|
try {
|
|
|
|
|
GWT.log("baseLayerFromISProfile.getName() :" + baseLayerFromISProfile.getName());
|
|
|
|
|
LayerObject lo = geoNaSpatialQueryResult.getSourceLayerObject();
|
|
|
|
|
LayerItem sourceLI = lo.getLayerItem();
|
|
|
|
|
|
|
|
|
|
String layerSourceName = sourceLI.getName();
|
|
|
|
|
|
|
|
|
|
// skipping centroid layer
|
|
|
|
|
if (layerSourceName == null
|
|
|
|
|
|| layerSourceName.compareToIgnoreCase(baseLayerFromISProfile.getName()) == 0) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String nomeConcessione = lo.getSourceConcessione().getNome();
|
|
|
|
|
if (prevConcessioneName.compareTo(nomeConcessione) != 0) {
|
|
|
|
|
String concessioneIntro = StringUtil.ellipsize(lo.getSourceConcessione().getNome(), 40);
|
|
|
|
|
Heading heading = new Heading(4, concessioneIntro);
|
|
|
|
|
heading.getElement().getStyle().setMarginBottom(10, Unit.PX);
|
|
|
|
|
flowPanel.add(heading);
|
|
|
|
|
HTML subText = new HTML(
|
|
|
|
|
"<p style=\"color:#999; font-size:14px; margin:5px 0 5px 0;\">Layers and Properties</p>");
|
|
|
|
|
flowPanel.add(subText);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
prevConcessioneName = nomeConcessione;
|
|
|
|
|
|
|
|
|
|
Label layerLabel = new Label();
|
|
|
|
|
layerLabel.setType(LabelType.INFO);
|
|
|
|
|
|
|
|
|
|
layerLabel.setText(layerSourceName);
|
|
|
|
|
layerLabel.getElement().getStyle().setMarginTop(10, Unit.PX);
|
|
|
|
|
layerLabel.getElement().getStyle().setMarginBottom(5, Unit.PX);
|
|
|
|
|
flowPanel.add(layerLabel);
|
|
|
|
|
|
|
|
|
|
List<FeatureRow> features = geoNaSpatialQueryResult.getFeatures();
|
|
|
|
|
|
|
|
|
|
if (features == null || features.isEmpty()) {
|
|
|
|
|
FlexTable flex = new FlexTable();
|
|
|
|
|
flex.setCellPadding(1);
|
|
|
|
|
flex.setCellSpacing(1);
|
|
|
|
|
flex.getElement().addClassName("table-feature");
|
|
|
|
|
flex.setHTML(0, 0, new HTML("<i>No data available</i>").toString());
|
|
|
|
|
flowPanel.add(flex);
|
|
|
|
|
continue;
|
|
|
|
|
// olMap.showPopup(vpPanel.toString(), onFailureCenterTo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GWT.log("Displaying "+features.size() + " features");
|
|
|
|
|
FlexTable intFlex = new FlexTable();
|
|
|
|
|
intFlex.setCellPadding(1);
|
|
|
|
|
intFlex.setCellSpacing(1);
|
|
|
|
|
intFlex.getElement().addClassName("table-feature");
|
|
|
|
|
|
|
|
|
|
intFlex.setHTML(0, 0, new HTML("Feature Id").toString());
|
|
|
|
|
intFlex.setHTML(1, 0, new HTML(feature.getId()).toString());
|
|
|
|
|
|
|
|
|
|
// Showing properties belonging to concessioni centroid layer
|
|
|
|
|
Map<String, List<String>> entries = feature.getMapProperties();
|
|
|
|
|
|
|
|
|
|
if (entries.size() == 0) {
|
|
|
|
|
intFlex.setHTML(1, 1, new HTML("No property available").toString());
|
|
|
|
|
}
|
|
|
|
|
int j = 1;
|
|
|
|
|
for (String key : entries.keySet()) {
|
|
|
|
|
List<String> theValues = entries.get(key);
|
|
|
|
|
String valueToDisplay = "";
|
|
|
|
|
for (String value : theValues) {
|
|
|
|
|
valueToDisplay+=value+", ";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int i = 0;
|
|
|
|
|
for (FeatureRow feature : features) {
|
|
|
|
|
|
|
|
|
|
intFlex.setHTML(i + 1, 0, new HTML(feature.getId()).toString());
|
|
|
|
|
|
|
|
|
|
// Showing properties belonging to concessioni layer
|
|
|
|
|
Map<String, List<String>> entries = feature.getMapProperties();
|
|
|
|
|
|
|
|
|
|
if (entries.size() == 0) {
|
|
|
|
|
//Adding this row to show "no property" for feature
|
|
|
|
|
//intFlex.setHTML(i + 1, 1, new HTML("<i>No property</i>").toString());
|
|
|
|
|
}
|
|
|
|
|
valueToDisplay = valueToDisplay.substring(0,valueToDisplay.length()-2);
|
|
|
|
|
intFlex.setHTML(0, j, new HTML(key).toString());
|
|
|
|
|
intFlex.setHTML(1, j, new HTML(valueToDisplay).toString());
|
|
|
|
|
j++;
|
|
|
|
|
|
|
|
|
|
int j = 0;
|
|
|
|
|
for (String key : entries.keySet()) {
|
|
|
|
|
List<String> theValues = entries.get(key);
|
|
|
|
|
String valueToDisplay = "";
|
|
|
|
|
for (String value : theValues) {
|
|
|
|
|
valueToDisplay += value + ", ";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
valueToDisplay = valueToDisplay.substring(0, valueToDisplay.length() - 2);
|
|
|
|
|
|
|
|
|
|
// adding the keys only of first feature row. They are equal for all features
|
|
|
|
|
// (beloning to same layer).
|
|
|
|
|
if (i == 0)
|
|
|
|
|
intFlex.setHTML(0, j + 1, new HTML(key).toString());
|
|
|
|
|
|
|
|
|
|
intFlex.setHTML(i + 1, j + 1, new HTML(valueToDisplay).toString());
|
|
|
|
|
j++;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
i++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
vpPanel.add(intFlex);
|
|
|
|
|
flowPanel.add(intFlex);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
GeoportalDataViewerConstants.printJs("Error: "+e.getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
olMap.showPopup(scrollPanel.toString(), queryClick.getCenter());
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// /**
|
|
|
|
|
// * Show popup info for layer.
|
|
|
|
|
// *
|
|
|
|
|
// * @param geoNaDataObject the geo na data object
|
|
|
|
|
// * @param feature the feature
|
|
|
|
|
// * @param onFailureCenterTo the on failure center to
|
|
|
|
|
// */
|
|
|
|
|
// public void showPopupInfoForLayer(List<GeoNaSpatialQueryResult> listGeoNaDataObject,
|
|
|
|
|
// ExtentWrapped queryClick) {
|
|
|
|
|
//
|
|
|
|
|
// ScrollPanel scrollPanel = new ScrollPanel();
|
|
|
|
|
// VerticalPanel vpPanel = new VerticalPanel();
|
|
|
|
|
// scrollPanel.add(vpPanel);
|
|
|
|
|
//
|
|
|
|
|
// String prevConcessioneName = "";
|
|
|
|
|
// for (GeoNaSpatialQueryResult geoNaSpatialQueryResult : listGeoNaDataObject) {
|
|
|
|
|
//
|
|
|
|
|
// GWT.log("baseLayerFromISProfile.getName() :"+baseLayerFromISProfile.getName());
|
|
|
|
|
// LayerObject lo = geoNaSpatialQueryResult.getSourceLayerObject();
|
|
|
|
|
// LayerItem sourceLI = lo.getLayerItem();
|
|
|
|
|
//
|
|
|
|
|
// String layerSourceName = sourceLI.getName();
|
|
|
|
|
//
|
|
|
|
|
// //skipping centroid layer
|
|
|
|
|
// if(layerSourceName==null || layerSourceName.compareToIgnoreCase(baseLayerFromISProfile.getName())==0) {
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// String nomeConcessione = lo.getSourceConcessione().getNome();
|
|
|
|
|
// if(prevConcessioneName.compareTo(nomeConcessione)!=0) {
|
|
|
|
|
// String concessioneIntro = StringUtil.ellipsize(lo.getSourceConcessione().getNome(), 40);
|
|
|
|
|
// Heading heading = new Heading(4, concessioneIntro);
|
|
|
|
|
// heading.getElement().getStyle().setMarginBottom(10, Unit.PX);
|
|
|
|
|
// vpPanel.add(heading);
|
|
|
|
|
// HTML subText = new HTML("<p style=\"color:#999; font-size:14px; margin:5px 0 5px 0;\">Layers and Properties</p>");
|
|
|
|
|
// vpPanel.add(subText);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// prevConcessioneName = nomeConcessione;
|
|
|
|
|
//
|
|
|
|
|
// Label layerLabel = new Label();
|
|
|
|
|
// layerLabel.setType(LabelType.INFO);
|
|
|
|
|
//
|
|
|
|
|
// layerLabel.setText(layerSourceName);
|
|
|
|
|
// layerLabel.getElement().getStyle().setMarginTop(10, Unit.PX);
|
|
|
|
|
// layerLabel.getElement().getStyle().setMarginBottom(5, Unit.PX);
|
|
|
|
|
// vpPanel.add(layerLabel);
|
|
|
|
|
//
|
|
|
|
|
// List<FeatureRow> features = geoNaSpatialQueryResult.getFeatures();
|
|
|
|
|
//
|
|
|
|
|
// if (features == null || features.isEmpty()) {
|
|
|
|
|
// FlexTable flex = new FlexTable();
|
|
|
|
|
// flex.setCellPadding(1);
|
|
|
|
|
// flex.setCellSpacing(1);
|
|
|
|
|
// flex.getElement().addClassName("table-feature");
|
|
|
|
|
// flex.setHTML(0, 0, new HTML("No data available").toString());
|
|
|
|
|
// vpPanel.add(flex);
|
|
|
|
|
// continue;
|
|
|
|
|
// //olMap.showPopup(vpPanel.toString(), onFailureCenterTo);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// for (FeatureRow feature : features) {
|
|
|
|
|
//
|
|
|
|
|
// FlexTable intFlex = new FlexTable();
|
|
|
|
|
// intFlex.setCellPadding(1);
|
|
|
|
|
// intFlex.setCellSpacing(1);
|
|
|
|
|
// intFlex.getElement().addClassName("table-feature");
|
|
|
|
|
//
|
|
|
|
|
// intFlex.setHTML(0, 0, new HTML("Feature Id").toString());
|
|
|
|
|
// intFlex.setHTML(1, 0, new HTML(feature.getId()).toString());
|
|
|
|
|
//
|
|
|
|
|
// // Showing properties belonging to concessioni centroid layer
|
|
|
|
|
// Map<String, List<String>> entries = feature.getMapProperties();
|
|
|
|
|
//
|
|
|
|
|
// if (entries.size() == 0) {
|
|
|
|
|
// intFlex.setHTML(1, 1, new HTML("No property available").toString());
|
|
|
|
|
// }
|
|
|
|
|
// int j = 1;
|
|
|
|
|
// for (String key : entries.keySet()) {
|
|
|
|
|
// List<String> theValues = entries.get(key);
|
|
|
|
|
// String valueToDisplay = "";
|
|
|
|
|
// for (String value : theValues) {
|
|
|
|
|
// valueToDisplay+=value+", ";
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
// valueToDisplay = valueToDisplay.substring(0,valueToDisplay.length()-2);
|
|
|
|
|
// intFlex.setHTML(0, j, new HTML(key).toString());
|
|
|
|
|
// intFlex.setHTML(1, j, new HTML(valueToDisplay).toString());
|
|
|
|
|
// j++;
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// vpPanel.add(intFlex);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// olMap.showPopup(scrollPanel.toString(), queryClick.getCenter());
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Show popup info for centroid layer.
|
|
|
|
|