Robert,
I changed this a little as I wanted to have a separate header for each return result. My problem is that the way it returns the tables is never consistent. Which ever one finishes first gets displayed first. any idea how to fix this?
Here are my changes.
function (jobInfo) {
var jobNames = Object.keys(jobInfo.results);
this, function (name, index) {
this.gp.getResultData(jobInfo.jobId, name, lang.hitch(this, this.renderResult, name));
function (name, result) {
//this.shelter.hide();
var resultArray = result.value.features;
if (name === "LRM_DR1") {
this.resultString += '<table class="test"><tr><th>Corridor and Roadbed</th><th>Accum. Mileage</th></tr>';
else if (name === "LRM_DC_RM_MI1"){
this.resultString += '<table class="test"><tr><th>Route_RM</th><th>RM Offset</th></tr>';
if (resultArray.length > 0) {
//loop through and populate table
for (var i = 0; i < resultArray.length; i++) {
if (name === "LRM_DR1") {
this.resultString += '<tr><td>' + resultArray.attributes.RID + '</td><td>' +
'</td></tr>';
else if (name === "LRM_DC_RM_MI1") {
this.resultString += '<tr><td>' + resultArray.attributes.Route + '</td><td>' +
'</td></tr>';
this.resultString += '</table>';
else {
//Return No results message
this.resultString = "No result Returned please click on Route";
var div;
this.shelter.hide();
if (GLOBE.wkid === 4326) {
"resultDiv");
this.resultString;
else if (GLOBE.wkid === 32100) {
"stplmDiv");
this.resultString;
else if (GLOBE.wkid === 102700) {
"stplfDiv");
this.resultString;
else {
'resultDiv');
this.resultString;
if (GLOBE.wkid !== 102100) {
var outSR = new SpatialReference(102100);
this.gsvc.project([GLOBE.evt], outSR, function (projectPoints) {
var pt = projectPoints[0];
var point = new Point(pt);
var newGraphic = new Graphic(point, GLOBE.pointSymbol);