I've realized that the basemap might not be the issue.Here are the JSON files for two different mobile apps. The scripts look identical, but are referring to different map services.The first one will zoom in to a queryTask result, but the second one will only zoom in if you select another basemap(within the app).This is the one that works{
"version" : "1.3",
"operationalLayers" : [{
"url" : "http://myserver/ArcGIS/rest/services/maps/iOS_Forum_Test/MapServer",
"visibility" : true,
"opacity" : 1,
"title" : "GIS Layers"
}],
"tasks" : {
"queryTasks" : [{
"displayField" : "Find Congressional District",
"name" : "Congressional District",
"parameters" : [{
"defaultValue" : "",
"field" : "CD111FP",
"helpTip" : "Enter # Here",
"operator" : "=",
"prompt" : "Find Congressional District by Number"
}],
"url" : "http://myserver/ArcGIS/rest/services/maps/iOS_Forum_Test/MapServer/1",
"visibleFields" : ["CD111FP","GEOID10","NAMELSAD10","ALAND10"],
"whereClause" : "{0}"
}]
}
}
This one does not work{
"version" : "1.3",
"operationalLayers" : [{
"url" : "http://myserver/ArcGIS/rest/services/maps/Mobile_AMR/MapServer",
"visibility" : true,
"opacity" : 1,
"title" : "GIS Layers"
}],
"tasks" : {
"queryTasks" : [{
"displayField" : "DCU_NAME",
"name" : "DCU Query",
"parameters" : [{
"defaultValue" : "",
"field" : "DCU_NAME",
"helpTip" : "Enter DCU Name Here",
"operator" : "=",
"prompt" : "DCU Query by Name"
}],
"url" : "http://myserver/ArcGIS/rest/services/maps/Mobile_AMR/MapServer/0",
"visibleFields" : ["DCU_NAME","STATUS","DESCRIPTION","NAME"],
"whereClause" : "{0}"
}]
}
}