added js logs. Commented common maps
This commit is contained in:
parent
ccb506fa3b
commit
34ebb8d648
2
pom.xml
2
pom.xml
|
@ -135,7 +135,7 @@
|
||||||
<groupId>org.gcube.core</groupId>
|
<groupId>org.gcube.core</groupId>
|
||||||
<artifactId>common-scope-maps</artifactId>
|
<artifactId>common-scope-maps</artifactId>
|
||||||
<!-- <version>[1.1.0, 2.0.0-SNAPSHOT)</version> -->
|
<!-- <version>[1.1.0, 2.0.0-SNAPSHOT)</version> -->
|
||||||
<scope>compile</scope>
|
<!-- <scope>compile</scope> -->
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.common.portal</groupId>
|
<groupId>org.gcube.common.portal</groupId>
|
||||||
|
|
|
@ -121,6 +121,7 @@ public class GeoportalDataViewer implements EntryPoint {
|
||||||
Long.parseLong(paramGeonaItemID);
|
Long.parseLong(paramGeonaItemID);
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
Window.alert("Bad format for parameter "+GeoportalDataViewerConstants.GET_GEONA_ITEM_ID+". It must be a Long");
|
Window.alert("Bad format for parameter "+GeoportalDataViewerConstants.GET_GEONA_ITEM_ID+". It must be a Long");
|
||||||
|
paramGeonaItemID = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
|
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
|
||||||
|
@ -247,17 +248,20 @@ public class GeoportalDataViewer implements EntryPoint {
|
||||||
@Override
|
@Override
|
||||||
public void onLayerRendered(AddedLayerToMapEvent addedLayerToMapEvent) {
|
public void onLayerRendered(AddedLayerToMapEvent addedLayerToMapEvent) {
|
||||||
GWT.log("Fired AddedLayerToMapEvent "+addedLayerToMapEvent.getLayerItem());
|
GWT.log("Fired AddedLayerToMapEvent "+addedLayerToMapEvent.getLayerItem());
|
||||||
|
GeoportalDataViewerConstants.print("Fired AddedLayerToMapEvent "+addedLayerToMapEvent.getLayerItem());
|
||||||
|
|
||||||
//the parameter gid has been passed in the query string
|
//the parameter gid has been passed in the query string
|
||||||
if(paramGeonaItemID!=null && mainPanel.getDisplyedRecord()!=null) {
|
if(paramGeonaItemID!=null && mainPanel.getDisplyedRecord()!=null) {
|
||||||
RecordDV record = mainPanel.getDisplyedRecord();
|
RecordDV record = mainPanel.getDisplyedRecord();
|
||||||
GWT.log("record instanceof ConcessioneDV: " +(record instanceof ConcessioneDV));
|
GWT.log("record instanceof ConcessioneDV: " +(record instanceof ConcessioneDV));
|
||||||
|
GeoportalDataViewerConstants.print("record instanceof ConcessioneDV: " +(record instanceof ConcessioneDV));
|
||||||
if(record instanceof ConcessioneDV) {
|
if(record instanceof ConcessioneDV) {
|
||||||
ConcessioneDV concessioneDV = (ConcessioneDV) record;
|
ConcessioneDV concessioneDV = (ConcessioneDV) record;
|
||||||
Double x = concessioneDV.getCentroidLong();
|
Double x = concessioneDV.getCentroidLong();
|
||||||
Double y = concessioneDV.getCentroidLat();
|
Double y = concessioneDV.getCentroidLat();
|
||||||
Coordinate transfCoord = MapUtils.transformCoordiante(new Coordinate(x, y), GeoportalDataViewerConstants.EPSG_4326, GeoportalDataViewerConstants.EPSG_3857);
|
Coordinate transfCoord = MapUtils.transformCoordiante(new Coordinate(x, y), GeoportalDataViewerConstants.EPSG_4326, GeoportalDataViewerConstants.EPSG_3857);
|
||||||
GeoQuery select = olMapMng.toDataPointQuery(transfCoord);
|
GeoQuery select = olMapMng.toDataPointQuery(transfCoord);
|
||||||
|
GeoportalDataViewerConstants.print("fireEvent QueryDataEvent");
|
||||||
layerManager.getLayerManagerBus().fireEvent(new QueryDataEvent(select, transfCoord, record.getId()));
|
layerManager.getLayerManagerBus().fireEvent(new QueryDataEvent(select, transfCoord, record.getId()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,6 +90,7 @@ public class LayerManager {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onQueryInteraction(final QueryDataEvent queryEvent) {
|
public void onQueryInteraction(final QueryDataEvent queryEvent) {
|
||||||
|
GeoportalDataViewerConstants.print("fired QueryDataEvent: "+queryEvent.toString());
|
||||||
|
|
||||||
if(queryEvent.getGeoQuery()!=null) {
|
if(queryEvent.getGeoQuery()!=null) {
|
||||||
GeoQuery selectDataInfo = queryEvent.getGeoQuery();
|
GeoQuery selectDataInfo = queryEvent.getGeoQuery();
|
||||||
|
@ -135,7 +136,9 @@ public class LayerManager {
|
||||||
|
|
||||||
GWT.log("Bounds is: "+mapBBOX);
|
GWT.log("Bounds is: "+mapBBOX);
|
||||||
GWT.log("MAX_WFS_FEATURES is: "+GeoportalDataViewerConstants.MAX_WFS_FEATURES);
|
GWT.log("MAX_WFS_FEATURES is: "+GeoportalDataViewerConstants.MAX_WFS_FEATURES);
|
||||||
|
|
||||||
|
GeoportalDataViewerConstants.print("calling getDataResult");
|
||||||
|
|
||||||
GeoportalDataViewerServiceAsync.Util.getInstance().getDataResult(layerObjects, olMap.getProjectionCode(), mapBBOX, GeoportalDataViewerConstants.MAX_WFS_FEATURES, olMap.getCurrentZoomLevel(), new AsyncCallback<List<GeoNaSpatialQueryResult>>() {
|
GeoportalDataViewerServiceAsync.Util.getInstance().getDataResult(layerObjects, olMap.getProjectionCode(), mapBBOX, GeoportalDataViewerConstants.MAX_WFS_FEATURES, olMap.getCurrentZoomLevel(), new AsyncCallback<List<GeoNaSpatialQueryResult>>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -67,4 +67,19 @@ public class QueryDataEvent extends GwtEvent<QueryDataEventHandler> {
|
||||||
public Coordinate getoLCoordinate() {
|
public Coordinate getoLCoordinate() {
|
||||||
return oLCoordinate;
|
return oLCoordinate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder builder = new StringBuilder();
|
||||||
|
builder.append("QueryDataEvent [select=");
|
||||||
|
builder.append(select);
|
||||||
|
builder.append(", oLCoordinate=");
|
||||||
|
builder.append(oLCoordinate);
|
||||||
|
builder.append(", recordId=");
|
||||||
|
builder.append(recordId);
|
||||||
|
builder.append("]");
|
||||||
|
return builder.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue