ref 11708: Setting initial map location and zoom level for the spatial data inputs in SAI
https://support.d4science.org/issues/11708 Added location and zoom git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/data-miner-manager-widget@178771 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
30186b5ab1
commit
6909c05d3f
|
@ -1,12 +1,12 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" output="target/data-miner-manager-widget-1.3.1-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
<classpathentry kind="src" output="target/data-miner-manager-widget-1.4.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry excluding="**" kind="src" output="target/data-miner-manager-widget-1.3.1-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
<classpathentry excluding="**" kind="src" output="target/data-miner-manager-widget-1.4.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
|
@ -33,5 +33,5 @@
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
<classpathentry kind="output" path="target/data-miner-manager-widget-1.3.1-SNAPSHOT/WEB-INF/classes"/>
|
<classpathentry kind="output" path="target/data-miner-manager-widget-1.4.0-SNAPSHOT/WEB-INF/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -3,11 +3,11 @@ org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||||
org.eclipse.jdt.core.compiler.source=1.7
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
|
|
|
@ -1,11 +1,19 @@
|
||||||
<ReleaseNotes>
|
<ReleaseNotes>
|
||||||
|
<Changeset component="org.gcube.portlets.widgets.data-miner-manager-widget.1-4-0"
|
||||||
|
date="2019-04-01">
|
||||||
|
<Change>Added location and zoom support [ticket #11708]</Change>
|
||||||
|
<Change>Added coordinates EPSG:4326 and EPSG:3857 support [ticket
|
||||||
|
#11710]</Change>
|
||||||
|
</Changeset>
|
||||||
<Changeset component="org.gcube.portlets.widgets.data-miner-manager-widget.1-3-1"
|
<Changeset component="org.gcube.portlets.widgets.data-miner-manager-widget.1-3-1"
|
||||||
date="2018-10-01">
|
date="2018-10-01">
|
||||||
<Change>Updated to support Metadata by StorageHub[ticket #11879]</Change>
|
<Change>Updated to support Metadata by StorageHub[ticket #11879]
|
||||||
|
</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="org.gcube.portlets.widgets.data-miner-manager-widget.1-3-0"
|
<Changeset component="org.gcube.portlets.widgets.data-miner-manager-widget.1-3-0"
|
||||||
date="2018-10-01">
|
date="2018-10-01">
|
||||||
<Change>Updated to support download by StorageHub[ticket #11879]</Change>
|
<Change>Updated to support download by StorageHub[ticket #11879]
|
||||||
|
</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="org.gcube.portlets.widgets.data-miner-manager-widget.1-2-0"
|
<Changeset component="org.gcube.portlets.widgets.data-miner-manager-widget.1-2-0"
|
||||||
date="2018-07-01">
|
date="2018-07-01">
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
<groupId>org.gcube.portlets.widgets</groupId>
|
<groupId>org.gcube.portlets.widgets</groupId>
|
||||||
<artifactId>data-miner-manager-widget</artifactId>
|
<artifactId>data-miner-manager-widget</artifactId>
|
||||||
<version>1.3.1-SNAPSHOT</version>
|
<version>1.4.0-SNAPSHOT</version>
|
||||||
|
|
||||||
<name>data-miner-manager-widget</name>
|
<name>data-miner-manager-widget</name>
|
||||||
<description>data-miner-manager-widget offers a unique access to perform data mining and statistical operations on heterogeneous data</description>
|
<description>data-miner-manager-widget offers a unique access to perform data mining and statistical operations on heterogeneous data</description>
|
||||||
|
|
|
@ -11,6 +11,7 @@ import org.gcube.portlets.widgets.openlayerbasicwidgets.client.event.SelectAreaD
|
||||||
import org.gcube.portlets.widgets.openlayerbasicwidgets.client.event.SelectAreaDialogEvent.SelectAreaDialogEventHandler;
|
import org.gcube.portlets.widgets.openlayerbasicwidgets.client.event.SelectAreaDialogEvent.SelectAreaDialogEventHandler;
|
||||||
import org.gcube.portlets.widgets.openlayerbasicwidgets.client.widgets.AreaSelectionDialog;
|
import org.gcube.portlets.widgets.openlayerbasicwidgets.client.widgets.AreaSelectionDialog;
|
||||||
import org.gcube.portlets.widgets.openlayerbasicwidgets.client.widgets.GeometryType;
|
import org.gcube.portlets.widgets.openlayerbasicwidgets.client.widgets.GeometryType;
|
||||||
|
import org.gcube.portlets.widgets.openlayerbasicwidgets.shared.data.Coordinates;
|
||||||
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
import com.google.gwt.core.shared.GWT;
|
import com.google.gwt.core.shared.GWT;
|
||||||
|
@ -52,7 +53,8 @@ public class WKTFld extends AbstractFld {
|
||||||
private TextField selectedAreaField;
|
private TextField selectedAreaField;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param parameter parameter
|
* @param parameter
|
||||||
|
* parameter
|
||||||
*/
|
*/
|
||||||
public WKTFld(Parameter parameter) {
|
public WKTFld(Parameter parameter) {
|
||||||
super(parameter);
|
super(parameter);
|
||||||
|
@ -71,14 +73,12 @@ public class WKTFld extends AbstractFld {
|
||||||
HtmlLayoutContainer descr;
|
HtmlLayoutContainer descr;
|
||||||
|
|
||||||
if (wktParameter.getDescription() == null) {
|
if (wktParameter.getDescription() == null) {
|
||||||
descr = new HtmlLayoutContainer(
|
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'></p>");
|
||||||
"<p style='margin-left:5px !important;'></p>");
|
|
||||||
descr.addStyleName("workflow-fieldDescription");
|
descr.addStyleName("workflow-fieldDescription");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
descr = new HtmlLayoutContainer(
|
descr = new HtmlLayoutContainer(
|
||||||
"<p style='margin-left:5px !important;'>"
|
"<p style='margin-left:5px !important;'>" + wktParameter.getDescription() + "</p>");
|
||||||
+ wktParameter.getDescription() + "</p>");
|
|
||||||
descr.addStyleName("workflow-fieldDescription");
|
descr.addStyleName("workflow-fieldDescription");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,6 +120,16 @@ public class WKTFld extends AbstractFld {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Coordinates getCoordinates() {
|
||||||
|
Coordinates coordinates = null;
|
||||||
|
if (wktParameter != null && wktParameter.getCoordinates() != null) {
|
||||||
|
coordinates = new Coordinates(wktParameter.getCoordinates().getProjection(),
|
||||||
|
wktParameter.getCoordinates().getX(), wktParameter.getCoordinates().getY(),
|
||||||
|
wktParameter.getCoordinates().getZoom());
|
||||||
|
}
|
||||||
|
return coordinates;
|
||||||
|
}
|
||||||
|
|
||||||
private void drawAGeometry() {
|
private void drawAGeometry() {
|
||||||
SelectAreaDialogEventHandler handler = new SelectAreaDialogEventHandler() {
|
SelectAreaDialogEventHandler handler = new SelectAreaDialogEventHandler() {
|
||||||
|
|
||||||
|
@ -136,8 +146,7 @@ public class WKTFld extends AbstractFld {
|
||||||
showFieldWithSelection();
|
showFieldWithSelection();
|
||||||
break;
|
break;
|
||||||
case Failed:
|
case Failed:
|
||||||
Log.error("Error during area selection: "
|
Log.error("Error during area selection: " + event.getException());
|
||||||
+ event.getException());
|
|
||||||
UtilsGXT3.alert("Error", event.getErrorMessage());
|
UtilsGXT3.alert("Error", event.getErrorMessage());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -147,7 +156,9 @@ public class WKTFld extends AbstractFld {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
areaSelectionDialog = new AreaSelectionDialog(getGeometryType());
|
GeometryType geometryType = getGeometryType();
|
||||||
|
Coordinates coordinates = getCoordinates();
|
||||||
|
areaSelectionDialog = new AreaSelectionDialog(geometryType, coordinates);
|
||||||
areaSelectionDialog.setZIndex(XDOM.getTopZIndex());
|
areaSelectionDialog.setZIndex(XDOM.getTopZIndex());
|
||||||
areaSelectionDialog.addSelectAreaDialogEventHandler(handler);
|
areaSelectionDialog.addSelectAreaDialogEventHandler(handler);
|
||||||
areaSelectionDialog.show();
|
areaSelectionDialog.show();
|
||||||
|
@ -155,8 +166,7 @@ public class WKTFld extends AbstractFld {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void init() {
|
private void init() {
|
||||||
selectButton = new TextButton("Draw a "
|
selectButton = new TextButton("Draw a " + wktParameter.getWktGeometryType().getLabel());
|
||||||
+ wktParameter.getWktGeometryType().getLabel());
|
|
||||||
selectButton.setIcon(DataMinerManagerPanel.resources.drawGeometry());
|
selectButton.setIcon(DataMinerManagerPanel.resources.drawGeometry());
|
||||||
selectButton.addSelectHandler(new SelectEvent.SelectHandler() {
|
selectButton.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||||
|
|
||||||
|
@ -166,8 +176,8 @@ public class WKTFld extends AbstractFld {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//selectButton.setToolTip("Draw a "
|
// selectButton.setToolTip("Draw a "
|
||||||
// + wktParameter.getWktGeometryType().getLabel());
|
// + wktParameter.getWktGeometryType().getLabel());
|
||||||
|
|
||||||
selectButton2 = new TextButton("");
|
selectButton2 = new TextButton("");
|
||||||
selectButton2.setIcon(DataMinerManagerPanel.resources.folderExplore());
|
selectButton2.setIcon(DataMinerManagerPanel.resources.folderExplore());
|
||||||
|
@ -178,8 +188,8 @@ public class WKTFld extends AbstractFld {
|
||||||
drawAGeometry();
|
drawAGeometry();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//selectButton2.setToolTip("Select Another "
|
// selectButton2.setToolTip("Select Another "
|
||||||
// + wktParameter.getWktGeometryType().getLabel());
|
// + wktParameter.getWktGeometryType().getLabel());
|
||||||
|
|
||||||
cancelButton = new TextButton("");
|
cancelButton = new TextButton("");
|
||||||
cancelButton.setIcon(DataMinerManagerPanel.resources.cancel());
|
cancelButton.setIcon(DataMinerManagerPanel.resources.cancel());
|
||||||
|
|
Loading…
Reference in New Issue