Evon,
Are you setting the Query.outSpatialReference?
In the query this is what I have
var queryTask = new QueryTask({
url:urlLink
});
var query = new Query();
var geometry = null;
query.returnGeometry = true;
query.outFields = ["*"];
query.where = "CONST_NAME LIKE '%"+searchString+"%'";
You need to set the outSpatialReference to the views spatialReference
Should the URL for the QueryTask be to a
"..../FeatureServer/1" or "..../MapServer/1" ending
either is fine.
Ok I changed it to FeatureServer and added the spatialRef and it seems to be working now, however it did not show an error in the console which worries me as these silent errors are hard to debug. Thanks much for your help
Evon,
It really was not an error at all the graphic were just being added to the map in their native WKID which was different from the maps wkid so they were probably over in Africa somewhere. You just need to understand that if the map service is in a spatial reference other than the views then you need to specify that the querys outspatialreference needs to be the same as the views.
I over looked this fact based on the other layers that were being drawn over more or less the correct region. I have learnt something today for sure.