I am developping a GIS web application using the ArcGIS JS API. I know that scaled cost barriers are available in ArcMap, but I am wondering if they exist in the JS API or in the REST API and if not I am wondering if there are any alternatives


1 Answer 1


The short answer is 'yes', scaled cost barriers can be exposed within NetworkAnalyst services in ArcGIS Server, and therefore are accessible to JavaScript applications as well.

To leverage this functionality you must include appropriate corresponding attribute values for any barrier Graphics passed in your request.

see the discussion of added cost barriers for an individual service here (mentioned within the description for the Polygon_Barriers parameter) for more information.

  • Thank you for your answer. So the only way to do this is use a Geoprocessing Service I guess? Because what I was doing is sharing a route layer from ArcMap to ArcGIS Server as a Network Analyst Server (NAServer) but when I tried to use "Solve Route" I couldn't choose the type of barriers in that case. So what I understand from your answer is that I should try to do that using a Geoprocessing Service?
    – Hamri Said
    Commented Feb 19, 2015 at 9:36
  • 1
    i didn't notice that i initially sent you a link to a GP service, but no, i think the same functionality can be configured for NA services as well. check out the BarrierType attribute exposed here. Commented Feb 19, 2015 at 15:46
  • Thank you for your comment. I didn't notice that it existed! Just one more thing how will I use this in the parameters of my "Solve Route" operation?
    – Hamri Said
    Commented Feb 20, 2015 at 9:24
  • as i stated in my original answer, barrier graphics need to be supplied in the request with appropriate attributes. Commented Feb 20, 2015 at 17:42
  • Thank you very much for your helpful answer. It did the trick
    – Hamri Said
    Commented Feb 23, 2015 at 11:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.