This one is strange: i have a map that takes features from a gp service and turns them into a graphics layer. If i add the layer, for some reason
the map's spatialreference changes from 4686 to 4326, if i comment that line, the change does not happen.
The features exposed by the service come in 4686, below is the relevant part, taken from the rest service page:

Even worse, the table where data is stored, was created via arccatalog with wkid 4686. So, i have absolutely no idea where this 4326 is coming from.
<!DOCTYPE html><BR /><html><BR /><head><BR /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"><BR /> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/><BR /> <title>test</title><BR /><BR /><SPAN> <link rel="stylesheet" href="</SPAN><A class="jive-link-external-small" href="http://js.arcgis.com/3.12/dijit/themes/nihilo/nihilo.css" rel="nofollow noopener noreferrer" target="_blank">http://js.arcgis.com/3.12/dijit/themes/nihilo/nihilo.css</A><SPAN>"> </SPAN><BR /><SPAN> <link rel="stylesheet" href="</SPAN><A class="jive-link-external-small" href="http://js.arcgis.com/3.12/esri/css/esri.css" rel="nofollow noopener noreferrer" target="_blank">http://js.arcgis.com/3.12/esri/css/esri.css</A><SPAN>"> </SPAN><BR /><BR /> <script type="text/javascript">dojoConfig = {parseOnLoad: true};</script><BR /><SPAN> <script src="</SPAN><A class="jive-link-external-small" href="http://js.arcgis.com/3.12/" rel="nofollow noopener noreferrer" target="_blank">http://js.arcgis.com/3.12/</A><SPAN>"></script></SPAN><BR /><BR /> <script > <BR /> var mapa;<BR /> var gp;<BR /><BR /> require([<BR /> "esri/map", <BR /> "dojo/parser", <BR /> "esri/dijit/Print",<BR /> "dijit/Toolbar",<BR /> "dijit/form/Button",<BR /> "dojo/dom",<BR /> "dojo/dom-construct",<BR /> "esri/layers/FeatureLayer",<BR /> "esri/tasks/Geoprocessor",<BR /> "esri/tasks/FeatureSet",<BR /> "esri/layers/ArcGISTiledMapServiceLayer",<BR /> "esri/layers/ArcGISDynamicMapServiceLayer",<BR /> "esri/tasks/query", <BR /> "esri/tasks/QueryTask",<BR /> "dojo/domReady!" <BR /> ], <BR /> function(Map, Extent, Button, Toolbar, parser, Print, FeatureLayer, Geoprocessor, Query, QueryTask) {<BR /> mapa = new Map("map", {<BR /> extent: new esri.geometry.Extent(-82.00, 4.50, -66.00, 14.00, new esri.SpatialReference({ wkid:4686 })),<BR /> zoom: 8, <BR /> slider: false,<BR /> spatialReference: { wkid: 4686 }<BR /> }); <BR /><BR /><BR /> gp = new esri.tasks.Geoprocessor("...");<BR /> gp.setOutputSpatialReference({wkid:4686});<BR /> gp.submitJob({}, completeCallback, statusCallback);<BR /> console.log(mapa);<BR /> });<BR /><BR /> function completeCallback(jobInfo){ <BR /> gp.getResultData(jobInfo.jobId, "...", function(results, messages) {<BR /> var symbol_ = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_SQUARE, 10, esri.symbol.SimpleLineSymbol.STYLE_SOLID, new esri.Color([255,0,0]) );<BR /><BR /> var gl = new esri.layers.GraphicsLayer();<BR /><BR /> for (var i = 0; i < results.value.features.length; i++) {<BR /> if (results.value.features<I>.geometry != null) { <BR /> results.value.features<I>.setSymbol(symbol_);<BR /> console.log(results.value.features<I>);<BR /> gl.add(results.value.features<I>);<BR /> }<BR /> }<BR /> mapa.addLayer(gl); // <-- THIS IS THE PROBLEMATIC LINE<BR /> console.log(gl); <BR /> });<BR /> }<BR /><BR /> function statusCallback(jobInfo) { <BR /> }<BR /><BR /> </script><BR /></head><BR /><BR /><body><BR /><div id="map"></div><BR /><BR /></body><BR /></html></I></I></I></I>
Thanks a lot.