hello
I want to improve a closest facility task in a flex web application.
I have a datalayer for my facilities with thousand's of rows.
I want to compute the facilities which are in my current map extent, In order to improve the performance of the task.
Without spatial filter, the task works slow (because of my thousand's of facilities) but works fine.
I try to filter my datalayer with its geometry property but without any result.
"
facilities.geometry=map.extent;
facilities.spatialRelationship="esriSpatialRelWithin";
m_naClosestFacilityParams.facilities=facilities;
"
When I solve my closest facility tasks, I have the error that there is no valid facility whereas I have tens of "localizable" facilities in my map extent.
event.fault.faultDetail = "0 Facilities localisés. Au moins 1 localisés nécessaires. Nombre insuffisant d???emplacements valides dans "Facilities" ou "Incidents"."
Does anyone know how to apply a spatial filter on a datalayer with its geometry property? Any example?
Thank for your help.
Charles