use of au.org.emii.portal.composer.MapComposer in project spatial-portal by AtlasOfLivingAustralia.
the class AreaPolygon method onClick$btnCancel.
public void onClick$btnCancel(Event event) {
MapComposer mc = getMapComposer();
if (layerName != null && mc.getMapLayer(layerName) != null) {
mc.removeLayer(layerName);
}
this.detach();
}
use of au.org.emii.portal.composer.MapComposer in project spatial-portal by AtlasOfLivingAustralia.
the class AreaMapPolygon method onCheck$rgPolygonLayers.
public void onCheck$rgPolygonLayers(Event event) {
Radio selectedItem = rgPolygonLayers.getSelectedItem();
//Add and remove layer to set as top layer
String layerName = selectedItem.getValue();
MapComposer mc = getMapComposer();
MapLayer ml = mc.getMapLayer(layerName);
mc.removeLayer(layerName);
mc.activateLayer(ml, true);
}
use of au.org.emii.portal.composer.MapComposer in project spatial-portal by AtlasOfLivingAustralia.
the class OpenFacetsEvent method onEvent.
@Override
public void onEvent(Event event) throws Exception {
MapComposer mc = (MapComposer) event.getPage().getFellow(StringConstants.MAPPORTALPAGE);
MapLayer mapLayer = mc.getMapLayer(layerName);
if (mapLayer != null) {
if (StringConstants.GRID.equals(mapLayer.getColourMode())) {
mapLayer.setColourMode("-1");
mc.updateLayerControls();
}
Events.echoEvent("openFacets", mc, null);
}
}
use of au.org.emii.portal.composer.MapComposer in project spatial-portal by AtlasOfLivingAustralia.
the class PredictionEvent 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);
}
mc.openModal("WEB-INF/zul/tool/Maxent.zul", params, StringConstants.ADDTOOLWINDOW);
}
use of au.org.emii.portal.composer.MapComposer in project spatial-portal by AtlasOfLivingAustralia.
the class ActiveLayersLegendEventListener method onEvent.
@Override
public void onEvent(Event event) throws Exception {
MapComposer mapComposer = getMapComposer(event);
if (mapComposer != null && mapComposer.safeToPerformMapAction()) {
// get reference to the label/image the user clicked on
Component target = event.getTarget();
Listitem listItem = (Listitem) target.getParent().getParent();
listItem.setSelected(true);
} else {
LOGGER.debug("MapController reports unsafe to perform action");
}
}
Aggregations