I would like to get the value of my argument in the following code for global use. Any ideas how I get severity?:
// temporarily show alert when starting edits
// and then start listening for a map click
var startCaptureRequest = function (severity) {
var listener;
// NOTE: once user has clicked 'x' to dismiss
// this alert, it will no longer show up
domStyle.set(app.startEditAlert, 'display', '');
setTimeout(function () {
domStyle.set(app.startEditAlert, 'display', 'none');
}, 3000);
// save map point in app global and
listener = app.map.on('click', function (e) {
listener.remove();
// save map point in app global and
// show form to collect incident report
app.currentGeometry = e.mapPoint;
if (severity == 0) {
alert("This will show the signs form.");
} else if (severity == 1) {
app.attributesModal.modal('show');
}
});
};