bug fixing and improvements
This commit is contained in:
parent
3d003a7429
commit
35c5ede770
|
@ -284,7 +284,7 @@ public class GeoportalDataViewer implements EntryPoint {
|
|||
@Override
|
||||
public void run() {
|
||||
attempt++;
|
||||
GWT.log("waiting got record tenative: " + attempt);
|
||||
GWT.log("waiting get record: " + attempt);
|
||||
RecordDV record = mainPanel.getDisplyedRecord();
|
||||
if (record != null) {
|
||||
this.cancel();
|
||||
|
@ -360,7 +360,7 @@ public class GeoportalDataViewer implements EntryPoint {
|
|||
// GeoportalDataViewerConstants.print("fireEvent QueryDataEvent");
|
||||
ExtentWrapped toExt = new ExtentWrapped(transfCoord.getX(), transfCoord.getY(), transfCoord.getX(), transfCoord.getY());
|
||||
layerManager.getLayerManagerBus().fireEvent(new QueryDataEvent(select, toExt,
|
||||
record.getItemId(), true, MapEventType.ADDED_LAYER_TO_MAP));
|
||||
record.getItemId(), true, MapEventType.ADDED_CENTROID_LAYER_TO_MAP));
|
||||
} else {
|
||||
GeoportalDataViewerConstants.printJs(
|
||||
"I cannot select the point one or both coordiantes are null. X: " + x + ", Y:" + y);
|
||||
|
|
|
@ -26,7 +26,7 @@ public class GeoportalDataViewerConstants {
|
|||
public static final String GET_CENTER_MAP_TO_LONG_LAT = OpenLayersMapParameters.OL_MAP_PARAM.centermap.name();
|
||||
|
||||
public static enum MapEventType {
|
||||
MOUSE_CLICK, MAP_ZOOM_END, MOVE_END, ADDED_LAYER_TO_MAP
|
||||
MOUSE_CLICK, MAP_ZOOM_END, MOVE_END, ADDED_CENTROID_LAYER_TO_MAP
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -177,6 +177,8 @@ public class LayerManager {
|
|||
return;
|
||||
|
||||
FeatureRow feature = null;
|
||||
|
||||
MapEventType sourceEvent = queryEvent.getSourceMapEventType();
|
||||
|
||||
// TODO SWTCH FOR EARCH ITEM TYPE
|
||||
for (GeoNaSpatialQueryResult geoNaDataObject : listGeonaDataObjects) {
|
||||
|
@ -219,7 +221,7 @@ 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 (queryEvent.getSourceMapEventType()
|
||||
if (sourceEvent
|
||||
.equals(MapEventType.MOUSE_CLICK)
|
||||
&& olMap.getCurrentZoomLevel() > OLMapManager.QUERY_MIN_ZOOM_LEVEL) {
|
||||
|
||||
|
@ -240,8 +242,8 @@ public class LayerManager {
|
|||
|
||||
GWT.log("the product id is: " + theProductId);
|
||||
// Displaying popup info for centroid layer
|
||||
if (queryEvent.getSourceMapEventType()
|
||||
.equals(MapEventType.MOUSE_CLICK)){
|
||||
if (sourceEvent
|
||||
.equals(MapEventType.MOUSE_CLICK) || sourceEvent.equals(MapEventType.ADDED_CENTROID_LAYER_TO_MAP)){
|
||||
showPopupInfoForCentroidLayer(geoNaDataObject, feature,
|
||||
queryEvent.getQueryClickExtent().getCenter());
|
||||
}
|
||||
|
|
|
@ -158,7 +158,8 @@ public class OLMapManager {
|
|||
// adding a tolerance in case of manual click
|
||||
if (manualClick) {
|
||||
// adding a tolerance for clicking
|
||||
geoWidth = (bboxWidth / w) * (14 / 2);
|
||||
//geoWidth = (bboxWidth / w) * (14 / 2);
|
||||
geoWidth = (bboxWidth / w) * (16 / 2);
|
||||
} else {
|
||||
// data point selection for coordinate loaded from concessione
|
||||
geoWidth = (bboxWidth / w) * (2);
|
||||
|
|
|
@ -283,8 +283,8 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
|
|||
String userName = user == null ? null : user.getUsername();
|
||||
|
||||
//TODO THIS IS A WORKAROUND WAITING FOR USER ROLE.
|
||||
//I CAN CHECK THE ACCCESS POLICIES ONLY IF THE USER IS NOT LOGGED IN.
|
||||
if (user != null) {
|
||||
//I CAN CHECK THE ACCCESS POLICIES IF AND ONLY IF THE USER IS NOT LOGGED IN.
|
||||
if (user == null) {
|
||||
|
||||
// CHECKING ACCESS POLICY
|
||||
LOG.info("Applying access policies for concessione " + mongoId + " returned by service");
|
||||
|
|
Loading…
Reference in New Issue