Select to view content in your preferred language

FeatureLayer using query

540
1
08-25-2011 05:05 AM
yihuilai
New Contributor
hello dear ArcGIS API for Flex team:

i have a question about using query in FeatureLayer

here's my code
var timeExtent:TimeExtent = new TimeExtent();
    var todayDate:Date = new Date();
    timeExtent.startTime = new Date("1993/01/01 00:00:01 UTC");
    timeExtent.endTime = new Date("1993/12/31 23:59:59 UTC");
    fLayer.timeDefinition = timeExtent;
    
    var query:Query = new Query();
    query.where = "Name = 'park'";
    fLayer.queryFeatures(query);
    map.addLayer(fLayer);


with this code, i can get a FeatureLayer with the timeDefinition  i set,
but i can't get the query data i set, is there any sugesstion?
please help me~tks!!
Tags (2)
0 Kudos
1 Reply
YungKaiChin
Occasional Contributor
You can assign both TimeExtent and definitionExpression to the featureLayer.

Try ...
fLayer.definitionExpression = "STATE_NAME like 'park'";

Here is the sample:
http://help.arcgis.com/en/webapi/flex/samples/index.html#/Search_with_FeatureLayer/01nq0000002500000...
0 Kudos