task_25066 #15
|
@ -28,8 +28,8 @@ public class LayerOrder {
|
|||
|
||||
LAYER_OFFSET.put(LAYER_TYPE.BASE_MAP, 0); //Base OL or MapBox
|
||||
LAYER_OFFSET.put(LAYER_TYPE.CUSTOM_WMS_DETAIL, 70); //WMS custom Overlay. Es. Layer "Limiti Amministrativi"
|
||||
LAYER_OFFSET.put(LAYER_TYPE.BASE_WMS, 140); // Index layers (i.e. centroids for UCD)
|
||||
LAYER_OFFSET.put(LAYER_TYPE.WMS_DETAIL, 210); //Layer/s belonging to a Project (materialized layers. Ex. "Posizionamento Scavo")
|
||||
LAYER_OFFSET.put(LAYER_TYPE.BASE_WMS, 210); // Index layers (i.e. centroids for UCD)
|
||||
LAYER_OFFSET.put(LAYER_TYPE.WMS_DETAIL, 140); //Layer/s belonging to a Project (materialized layers. Ex. "Posizionamento Scavo")
|
||||
LAYER_OFFSET.put(LAYER_TYPE.VECTOR, 320); //Vector layer to show other info. Ex. Pointer with coordinates (x,y) in the Light OL Map.
|
||||
}
|
||||
|
||||
|
|
|
@ -1199,7 +1199,7 @@ public abstract class OpenLayerMap {
|
|||
public void fitToExtent(ol.Extent extent) {
|
||||
ViewFitOptions opt = new ViewFitOptions();
|
||||
opt.setMaxZoom(16);
|
||||
opt.setDuration(SET_CENTER_ANIMATED_DURATION*4);
|
||||
opt.setDuration(SET_CENTER_ANIMATED_DURATION*5);
|
||||
map.getView().fit(extent, opt);
|
||||
|
||||
}
|
||||
|
|
|
@ -210,14 +210,6 @@ public class GeonaDataViewMainPanel extends Composite {
|
|||
|
||||
navListSearch.getElement().getFirstChildElement().setAttribute("disabled", "disabled");
|
||||
|
||||
// List<UseCaseDescriptorDV> listUCDs = new ArrayList<UseCaseDescriptorDV>();
|
||||
//
|
||||
// for (ItemFieldsResponse itemFieldsResponse : itemFieldsReponse) {
|
||||
// listUCDs.add(itemFieldsResponse.getUseCaseDescriptorDV());
|
||||
// }
|
||||
//
|
||||
// Collections.sort(listUCDs);
|
||||
|
||||
for (final ItemFieldsResponse itemFieldResp : itemFieldsReponse) {
|
||||
|
||||
UseCaseDescriptorDV ucd = itemFieldResp.getUseCaseDescriptorDV();
|
||||
|
@ -282,7 +274,9 @@ public class GeonaDataViewMainPanel extends Composite {
|
|||
|
||||
@Override
|
||||
public void execute() {
|
||||
searchFacilityPanel.getElement().getParentElement().getStyle().setOpacity(0.9);
|
||||
searchFacilityPanel.getElement().getParentElement().addClassName("opacity-09");
|
||||
panelCustomOverlayLayers.getElement().getParentElement().addClassName("opacity-09");
|
||||
panelCrossFilteringLayers.getElement().getParentElement().addClassName("opacity-09");
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -43,10 +43,6 @@ import com.google.gwt.event.dom.client.ClickEvent;
|
|||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.event.shared.HandlerManager;
|
||||
import com.google.gwt.http.client.URL;
|
||||
import com.google.gwt.json.client.JSONArray;
|
||||
import com.google.gwt.json.client.JSONObject;
|
||||
import com.google.gwt.json.client.JSONParser;
|
||||
import com.google.gwt.json.client.JSONValue;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.uibinder.client.UiField;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
|
@ -57,10 +53,9 @@ import com.google.gwt.user.client.ui.HTMLPanel;
|
|||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
||||
import jsinterop.base.JsPropertyMap;
|
||||
import ol.Coordinate;
|
||||
import ol.Extent;
|
||||
import ol.Feature;
|
||||
import ol.OLFactory;
|
||||
import ol.source.Vector;
|
||||
|
||||
/**
|
||||
* The Class CrossFilteringLayerPanel.
|
||||
|
@ -71,6 +66,8 @@ import ol.OLFactory;
|
|||
*/
|
||||
public class CrossFilteringLayerPanel extends Composite {
|
||||
|
||||
private static final double BBOX_OFFESET_ON_FEATURES = 18000.0;
|
||||
|
||||
private static final String ITEM_LABEL = "centroid";
|
||||
|
||||
public static String COLORSCALERANGE = "COLORSCALERANGE";
|
||||
|
@ -498,28 +495,24 @@ public class CrossFilteringLayerPanel extends Composite {
|
|||
panelResults.add(flexTable);
|
||||
|
||||
try {
|
||||
JSONObject jObject = (JSONObject) JSONParser.parseStrict(response);
|
||||
JSONArray bbox = (JSONArray) jObject.get("bbox");
|
||||
double[] coords = new double[bbox.size()];
|
||||
for (int i = 0; i < bbox.size(); i++) {
|
||||
JSONValue coord = bbox.get(i);
|
||||
coords[i] = Double.parseDouble(coord.toString());
|
||||
}
|
||||
|
||||
//Inverting coordinate to lat/long for EPSG:3857 Pseudo-Mercator
|
||||
Coordinate lower = OLFactory.createCoordinate(coords[1], coords[0]);
|
||||
Coordinate lowerCoord = MapUtils.transformCoordiante(lower, MAP_PROJECTION.EPSG_4326.getName(),
|
||||
if (features.length > 0) {
|
||||
// Calculating Extend of the selected Features
|
||||
Vector vector = new Vector();
|
||||
vector.addFeatures(features);
|
||||
Extent theExtent = vector.getExtent();
|
||||
GWT.log("Extent from features is: " + theExtent);
|
||||
theExtent = MapUtils.transformExtent(theExtent, MAP_PROJECTION.EPSG_4326.getName(),
|
||||
MAP_PROJECTION.EPSG_3857.getName());
|
||||
|
||||
Coordinate upper = OLFactory.createCoordinate(coords[3], coords[2]);
|
||||
Coordinate upperCoord = MapUtils.transformCoordiante(upper, MAP_PROJECTION.EPSG_4326.getName(),
|
||||
MAP_PROJECTION.EPSG_3857.getName());
|
||||
double bboxOffset = features.length>1?BBOX_OFFESET_ON_FEATURES:0;
|
||||
|
||||
final Extent transfExtent = new ExtentWrapped(lowerCoord.getX(), lowerCoord.getY(), upperCoord.getX(), upperCoord.getY());
|
||||
final Extent transfExtent = new ExtentWrapped(theExtent.getLowerLeftX() - bboxOffset,
|
||||
theExtent.getLowerLeftY() - bboxOffset, theExtent.getUpperRightX() + bboxOffset,
|
||||
theExtent.getUpperRightY() + bboxOffset);
|
||||
GWT.log("Zoom to selected - transf extent: " + transfExtent);
|
||||
|
||||
|
||||
Button selectTo = new Button("Zoom to selected");
|
||||
selectTo.setTitle("Zoom to select centroids...");
|
||||
selectTo.setType(ButtonType.DEFAULT);
|
||||
selectTo.addClickHandler(new ClickHandler() {
|
||||
|
||||
|
@ -530,15 +523,12 @@ public class CrossFilteringLayerPanel extends Composite {
|
|||
}
|
||||
});
|
||||
flexTable.setWidget(1, 0, selectTo);
|
||||
//panelResults.add(selectTo);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -561,7 +551,6 @@ public class CrossFilteringLayerPanel extends Composite {
|
|||
return toReturn;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load inner level.
|
||||
*
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -892,4 +892,8 @@ RESPONSIVE
|
|||
.filter-panel-style label {
|
||||
font-weight: bold;
|
||||
}
|
||||
/* END CUSTOM OVERLAY UI */
|
||||
|
||||
.opacity-09 {
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue