Select to view content in your preferred language

Set DataLayer to the Facilities in a Find Closest Facility task

1062
6
11-21-2011 12:21 AM
ZillaPlace
Emerging Contributor
Hi guys,

I couldn't find a way in the Help document to set a layer in a map service as an input to the Facilities parameter of  RouteClosestFacilityParameters. Do we have to pass in the facilities as graphics? It read that it's possible to do so in the REST api (http://denverdemo.esri.com/ArcGIS/SDK/REST/index.html), but the document is out of date. I tested the task on my AGS 10 but the only acceptable parameters are features. I think it's not really practical to feed the task with a lot of facility data at the run time, especially when the facility data can be easily defined and queried within the map service. Does anybody feel the same way?
0 Kudos
6 Replies
DominiqueBroux
Esri Frequent Contributor

Do we have to pass in the facilities as graphics?

Yes an enumeration of graphics (see Documentation)

 
I think it's not really practical to feed the task with a lot of facility data at the run time, especially when the facility data can be easily defined and queried within the map service.

This allows to use graphics defined at run time at the client side.

If you want to query the map service at the server side, one option is you to create a Geoprocessing tool with the queries as input.
0 Kudos
ZillaPlace
Emerging Contributor
Thanks for the reply, Dominique. I don't disagree with you on allowing users to input the facilities at the run time as one of options. I think it is equally useful or practical, if not more, to allow users to use the pre-set facilities as another option. That documentation in your reply shows facilities "can be either an instance of DataLayer or FeatureSet". So does the REST API documentation (http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/index.html?cfSolve.html). My question is how to set facilities with Data Layer using the REST API. Are both documentations wrong?
0 Kudos
DominiqueBroux
Esri Frequent Contributor
I got your point.

It seems that the documentation is not in sync with the implementation i.e. , at this time, AFAIK it's not possible to use a Data Layer as facilities.
Now I am not sure whether it's the implementation or the documentation which is wrong. I'll try to find more infos and will come back to you.
0 Kudos
ZillaPlace
Emerging Contributor
I got your point.

It seems that the documentation is not in sync with the implementation i.e. , at this time, AFAIK it's not possible to use a Data Layer as facilities.
Now I am not sure whether it's the implementation or the documentation which is wrong. I'll try to find more infos and will come back to you.


Thanks! Look forward to you reply.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
For now the documentation will be updated to be in sync with the current implementation and the usage of DataLayer has been added in the stack of the possible enhancements for a future version.

Thanks for reporting that.
0 Kudos
ZillaPlace
Emerging Contributor
For now the documentation will be updated to be in sync with the current implementation and the usage of DataLayer has been added in the stack of the possible enhancements for a future version.

Thanks for reporting that.


thanks for clarifying that.
0 Kudos