Hello,
I have this code and idk why i cannot get the "zoom" value for the query.
function onResult(featureSet:FeatureSet, token:Object = null):void
{
try{
var mapPoint:MapPoint = featureSet.features[0].geometry as MapPoint;
var convert:ConvertCoords = new ConvertCoords;
convert.ToGeographic(mapPoint.x,mapPoint.y);
lat = convert.Y_lat;
long =convert.X_lon;
map.zoomTo(featureSet.features[0].geometry);
//Alert.show("punto: " + mapPoint.x.toString() + " " +mapPoint.y.toString()+ " "+ "lat: " + convert.Y_lat.toString()+ " "+convert.X_lon.toString() );
map.level = 16;
zoom = featureSet.features[0].attributes["zoom"];
Alert.show(zoom.toString());
}catch(err:Error){
Alert.show("no");
}
}
function onFault(info:Object, token:Object = null):void
{
Alert.show("not found");
}Mensaje editado por: Evelyn Hernandez
Solved! Go to Solution.
i found my problem. I was using another layer and it doesnt have the "zoom" field
Thanks robert ![]()
Evelyn,
Your zoom attribute is all upper case in your service so code needs to be as well
zoom = featureSet.features[0].attributes["ZOOM"];
i receive a NaN, what can be the issue?
Evelyn,
What do you receive when you do this on one of the 3 records that does not have a null as its value in your data?
I receive a NaN value. I know that i have some null values , but "PLACILLA" has a zoom value.
I dont know why i cannot get it.
i found my problem. I was using another layer and it doesnt have the "zoom" field
Thanks robert ![]()