I have a feature layer being drawn from a map service. I have a graphics layer that is the result of a query (happens to be on the same feature layer). I wish to apply the same symbols from the Feature Layer to the new graphics layer produced by the query but have had no such luck. Relevant code bellow:
var featureLayer = new FeatureLayer(http://........);
function handleQuery(queryRslt) {
var queryGraphicsArray = queryRslt.features;
var featureLayerSymbol = featureLayer.renderer.getSymbol();
for (var i = 0 ; i < queryGraphicsArray.length ; i ++) {
queryGraphicsArray[i].symbol = featureLayerSymbol;
map.graphics.add(queryGraphicsArray[i]);
}
I can confirm that the query is in fact functioning properly. I can also confirm that the symbol appears to being changed using console.log and debugging tool. However nothing is added to the map.
The symbol is a picture symbol added inside of arcMap before publishing to AGS. It is a ping image.
Any thoughts as to where i am going wrong?