Display polygon results from geographic to WebMercator coordinates

Discussion created by doncav on Jan 3, 2013
Latest reply on Jan 9, 2013 by jacobsj
I am querying a service that returns back a polygon dataset which have geographic coordinates.  I want to convert the coordinates to WebMercator coordinates so the polygon can be displayed in the correct location.  I have tried several things with little success.  This seems extremely easy to accomplish but I'm just missing something.  Any help is appreciated.  Here is the code I'm using that displays the polygon in geographic coordinates.

var responseObj = eval('(' + response + ')');
var fs = new esri.tasks.FeatureSet(responseObj.RecordSet);
    for (var i = 0; i < fs.features.length; i++) {
        var gra = fs.features[i];
        if (i == 0) {
            var polySymbolBlue = new esri.symbol.SimpleFillSymbol();
            polySymbolBlue.setOutline(new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([0, 0, 0, 1]), 1));
                polySymbolBlue.setColor(new dojo.Color([48, 48, 100, 1]));
    //  Zoom to the collection of features

Here is a sample of what is returned from the service that the responseObj variable gets populated from: