Search in sources :

Example 1 with MapComposer

use of au.org.emii.portal.composer.MapComposer in project spatial-portal by AtlasOfLivingAustralia.

the class SpeciesListEvent method onEvent.

@Override
public void onEvent(Event event) throws Exception {
    Map<String, Object> params = new HashMap<String, Object>();
    if (polygonLayerName != null) {
        params.put(StringConstants.POLYGON_LAYER_NAME, polygonLayerName);
    } else {
        params.put(StringConstants.POLYGON_LAYER_NAME, StringConstants.NONE);
    }
    if (extraParams != null) {
        params.put(StringConstants.EXTRAPARAMS, extraParams);
    }
    if (geospatialKosher != null) {
        params.put(StringConstants.GEOSPATIAL_KOSHER, geospatialKosher);
    }
    params.put(StringConstants.CHOOSEENDEMIC, chooseEndemic);
    MapComposer mc = (MapComposer) event.getPage().getFellow(StringConstants.MAPPORTALPAGE);
    mc.openModal("WEB-INF/zul/tool/SpeciesList.zul", params, StringConstants.ADDTOOLWINDOW);
}
Also used : MapComposer(au.org.emii.portal.composer.MapComposer) HashMap(java.util.HashMap)

Example 2 with MapComposer

use of au.org.emii.portal.composer.MapComposer in project spatial-portal by AtlasOfLivingAustralia.

the class SamplingEvent method onEvent.

@Override
public void onEvent(Event event) throws Exception {
    MapComposer mc = (MapComposer) event.getPage().getFellow(StringConstants.MAPPORTALPAGE);
    Map<String, Object> params = new HashMap<String, Object>();
    if (speciesLayerName != null) {
        params.put(StringConstants.SPECIES_LAYER_NAME, speciesLayerName);
    } else {
        params.put(StringConstants.SPECIES_LAYER_NAME, StringConstants.NONE);
    }
    if (polygonLayerName != null) {
        params.put(StringConstants.POLYGON_LAYER_NAME, polygonLayerName);
    } else {
        params.put(StringConstants.POLYGON_LAYER_NAME, StringConstants.NONE);
    }
    if (environmentalLayerName != null) {
        params.put(StringConstants.ENVIRONMENTALLAYERNAME, environmentalLayerName);
    } else {
        params.put(StringConstants.ENVIRONMENTALLAYERNAME, StringConstants.NONE);
    }
    if (geospatialKosher != null) {
        params.put(StringConstants.GEOSPATIAL_KOSHER, geospatialKosher);
    }
    mc.openModal("WEB-INF/zul/tool/Sampling.zul", params, StringConstants.ADDTOOLWINDOW);
}
Also used : MapComposer(au.org.emii.portal.composer.MapComposer) HashMap(java.util.HashMap)

Example 3 with MapComposer

use of au.org.emii.portal.composer.MapComposer in project spatial-portal by AtlasOfLivingAustralia.

the class ScatterplotEvent method onEvent.

@Override
public void onEvent(Event event) throws Exception {
    MapComposer mc = (MapComposer) event.getPage().getFellow(StringConstants.MAPPORTALPAGE);
    Map<String, Object> params = new HashMap<String, Object>();
    if (speciesLayerName != null) {
        params.put(StringConstants.SPECIES_LAYER_NAME, speciesLayerName);
    } else {
        params.put(StringConstants.SPECIES_LAYER_NAME, StringConstants.NONE);
    }
    if (polygonLayerName != null) {
        params.put(StringConstants.POLYGON_LAYER_NAME, polygonLayerName);
    } else {
        params.put(StringConstants.POLYGON_LAYER_NAME, StringConstants.NONE);
    }
    if (environmentalLayerName != null) {
        params.put(StringConstants.ENVIRONMENTALLAYERNAME, environmentalLayerName);
    } else {
        params.put(StringConstants.ENVIRONMENTALLAYERNAME, "default");
    }
    mc.openModal("WEB-INF/zul/tool/Scatterplot.zul", params, StringConstants.ADDTOOLWINDOW);
}
Also used : MapComposer(au.org.emii.portal.composer.MapComposer) HashMap(java.util.HashMap)

Example 4 with MapComposer

use of au.org.emii.portal.composer.MapComposer in project spatial-portal by AtlasOfLivingAustralia.

the class SitesBySpeciesEvent method onEvent.

@Override
public void onEvent(Event event) throws Exception {
    Map<String, Object> params = new HashMap<String, Object>();
    if (speciesLayerName != null) {
        params.put(StringConstants.SPECIES_LAYER_NAME, speciesLayerName);
    } else {
        params.put(StringConstants.SPECIES_LAYER_NAME, StringConstants.NONE);
    }
    if (polygonLayerName != null) {
        params.put(StringConstants.POLYGON_LAYER_NAME, polygonLayerName);
    } else {
        params.put(StringConstants.POLYGON_LAYER_NAME, StringConstants.NONE);
    }
    if (environmentalLayerName != null) {
        params.put(StringConstants.ENVIRONMENTALLAYERNAME, environmentalLayerName);
    } else {
        params.put(StringConstants.ENVIRONMENTALLAYERNAME, "default");
    }
    MapComposer mc = (MapComposer) event.getPage().getFellow(StringConstants.MAPPORTALPAGE);
    mc.openModal("WEB-INF/zul/tool/SitesBySpecies.zul", params, StringConstants.ADDTOOLWINDOW);
}
Also used : MapComposer(au.org.emii.portal.composer.MapComposer) HashMap(java.util.HashMap)

Example 5 with MapComposer

use of au.org.emii.portal.composer.MapComposer in project spatial-portal by AtlasOfLivingAustralia.

the class AreaPolygon method onClick$btnClear.

public void onClick$btnClear(Event event) {
    MapComposer mc = getMapComposer();
    if (layerName != null && mc.getMapLayer(layerName) != null) {
        mc.removeLayer(layerName);
    }
    String script = mc.getOpenLayersJavascript().addPolygonDrawingTool();
    mc.getOpenLayersJavascript().execute(mc.getOpenLayersJavascript().getIFrameReferences() + script);
    displayGeom.setValue("");
    btnNext.setDisabled(true);
    btnClear.setDisabled(true);
    invalidWKT.setValue("");
}
Also used : MapComposer(au.org.emii.portal.composer.MapComposer)

Aggregations

MapComposer (au.org.emii.portal.composer.MapComposer)38 MapLayer (au.org.emii.portal.menu.MapLayer)20 Listitem (org.zkoss.zul.Listitem)6 HashMap (java.util.HashMap)5 Component (org.zkoss.zk.ui.Component)5 ParseException (com.vividsolutions.jts.io.ParseException)3 JSONObject (org.json.simple.JSONObject)3 ScatterplotDataDTO (au.org.ala.spatial.dto.ScatterplotDataDTO)2 Query (au.org.ala.spatial.util.Query)2 Geometry (com.vividsolutions.jts.geom.Geometry)2 WKTReader (com.vividsolutions.jts.io.WKTReader)2 DateFormat (java.text.DateFormat)2 SimpleDateFormat (java.text.SimpleDateFormat)2 Checkbox (org.zkoss.zul.Checkbox)2 Facet (au.org.ala.legend.Facet)1 ToolComposer (au.org.ala.spatial.composer.tool.ToolComposer)1 PortalSession (au.org.emii.portal.session.PortalSession)1 IsValidOp (com.vividsolutions.jts.operation.valid.IsValidOp)1 ArrayList (java.util.ArrayList)1 Calendar (java.util.Calendar)1