Maksim.I.Mazor

Showing Results from GP task

Discussion created by Maksim.I.Mazor on Jun 17, 2013
Latest reply on Jun 17, 2013 by evtguy
I've written a script that is supposed to show various delivery routes associated with Zip Codes for the United States. In my Firebug console it shows the script as being ran successfully, and I'm seeing the data/results that I need from the response. This includes field:value pairs and associated x,y values for each route. I have attempted various ways to display these on my map but nothing works thus far.

function displayResults(result, messages) {
  var simpleLineSymbol = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,
          new dojo.Color([255,255,0]), 1);
  var features = result.value.features;
  for (var f=0, fl=features.length; f<fl; f++) {
    var feature = features[f];
    feature.setSymbol(simpleLineSymbol);
    myMap.graphics.addLayer(feature);
  }
}

Above is my most recent failure, don't know where to turn. Can include my script if need be.

Outcomes