Book Image

Building Web and Mobile ArcGIS Server Applications with JavaScript

By : Eric Pimpler
Book Image

Building Web and Mobile ArcGIS Server Applications with JavaScript

By: Eric Pimpler

Overview of this book

<p>ArcGIS Server is the leading software for developing both web and mobile GIS applications. There are a number of programming languages that you can use to develop applications with ArcGIS Server including JavaScript, Flex, and Silverlight. However, the ArcGIS API for JavaScript is the preferred way of developing your custom applications for ArcGIS Server since it can be used for both web and mobile application development. It’s easy to use and doesn’t require the use of a browser plugin.</p> <p>This tutorial-based guide provides you with hands-on experience in developing custom web and mobile ArcGIS Server applications with step-by-step style exercises. Along with introducing you to the HTML/CSS/JavaScript technology stack, you will learn to add intuitive geographic layers of information to your map, interactive query and display of spatial data, add user interface widgets, access geoprocessing tasks, and many more in your own web and mobile GIS applications.</p> <p>With this practical, hands-on guide, you will be able to develop fully-functional online GIS applications with ArcGIS Server using the ArcGIS API for JavaScript. After creating your own map, you will explore how to add geographic layers from a variety of sources including tiled and dynamic map services, add graphics to the map, and stream geographic features to the browser using a FeatureLayer.</p> <p>Most applications include the specific functionalities implemented by ArcGIS Server as tasks. You’ll learn how to use the various tasks provided by ArcGIS Server including spatial and attribute queries, identification of features, finding features by attribute, and more. Geocoding and geoprocessing tasks are covered in-depth to help you accomplish your task in GIS. Finally, you’ll learn just how easy it is to integrate ArcGIS.com content into your custom developed applications.</p> <p>This comprehensive guide quickly advances through probing programmatic techniques for building web and mobile GIS applications which will make application development a lot easier!</p>
Table of Contents (20 chapters)
Building Web and Mobile ArcGIS Server Applications with JavaScript
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The ClosestFacility task


The ClosestFacility task measures the cost of traveling between incidents and facilities and determines which are nearest to one other. When looking for the closest facilities, you can specify how many to find and whether the direction of travel is towards or away from them. The closest facility solver displays the best routes between incidents and facilities, reports their travel costs, and returns driving directions.

The classes involved in solving closest facility operations include ClosestFacilityParameters, ClosestFacilityTask, and ClosestFacilitySolveResults, shown as follows:

The ClosestFacilityParameters class includes input parameters such as the default cutoff, whether or not to return incidents, routes, and directions, and more. These parameters are used as inputs to the ClosestFacilityTask class, which contains a solve() method. Finally, results are passed from ArcGIS Server back to the client in the form of a ClosestFacilitySolveResults object.

The ClosestFacilityParameters...