featureset value.

3765
5
Jump to solution
05-15-2015 11:09 AM
EvelynHernandez
Occasional Contributor III

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

0 Kudos
1 Solution

Accepted Solutions
EvelynHernandez
Occasional Contributor III

i found my problem. I was using another layer and it doesnt have the "zoom" field

Thanks robert

View solution in original post

0 Kudos
5 Replies
RobertScheitlin__GISP
MVP Emeritus

Evelyn,

   Your zoom attribute is all upper case in your service so code needs to be as well

zoom = featureSet.features[0].attributes["ZOOM"];

EvelynHernandez
Occasional Contributor III

i receive a NaN, what can be the issue?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

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?

0 Kudos
EvelynHernandez
Occasional Contributor III

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.

0 Kudos
EvelynHernandez
Occasional Contributor III

i found my problem. I was using another layer and it doesnt have the "zoom" field

Thanks robert

0 Kudos