You are previewing Building Web and Mobile ArcGIS Server Applications with JavaScript.
O'Reilly logo
Building Web and Mobile ArcGIS Server Applications with JavaScript

Book Description

Improve your knowledge and career prospects in web or mobile application development with this step-by-step practical guide to ArcGIS Server. Gives a good grounding in everything from creating maps to network analysis.

In Detail

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.

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.

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.

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 content into your custom developed applications.

This comprehensive guide quickly advances through probing programmatic techniques for building web and mobile GIS applications which will make application development a lot easier!

What You Will Learn

  • Create maps on a web page and add dynamic and tiled layers
  • Add graphics to maps
  • Use feature layers to render features in the browser
  • Incorporate widgets and toolbars that provide specific functionality to your application
  • Perform spatial and attribute queries
  • Access geoprocessing tasks including models
  • Geocode and reverse geocode addresses
  • Develop mobile GIS applications
  • Conduct network analysis
  • Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at If you purchased this book elsewhere, you can visit and register to have the files e-mailed directly to you.

    Table of Contents

    1. Building Web and Mobile ArcGIS Server Applications with JavaScript
      1. Table of Contents
      2. Building Web and Mobile ArcGIS Server Applications with JavaScript
      3. Credits
      4. About the Author
      5. About the Reviewers
        1. Support files, eBooks, discount offers and more
          1. Why Subscribe?
            1. Free Access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      8. 1. Introduction to HTML, CSS, and JavaScript
        1. Basic HTML page concepts
          1. The HTML DOCTYPE declaration
          2. Primary tags
          3. Validating HTML code
        2. JavaScript fundamentals
          1. Commenting in code
          2. Variables
          3. JavaScript and case sensitivity
          4. Variable datatypes
          5. Decision-supporting statements
          6. Looping statements
          7. Functions
          8. Objects
        3. Basic CSS principles
          1. CSS syntax
          2. Inline styling
          3. Internal stylesheets
          4. External stylesheets
        4. Separating HTML, CSS, and JavaScript
        5. Summary
      9. 2. Creating Maps and Adding Layers
        1. Introduction
        2. The ArcGIS API for JavaScript Sandbox
        3. Basic steps for creating an application with the ArcGIS API for JavaScript
          1. Creating HTML code for a web page
          2. Referencing the ArcGIS API for JavaScript
          3. Loading modules
            1. Legacy or AMD Dojo?
          4. Making sure Document Object Model is available
          5. Creating the map
          6. Creating the page content
          7. Styling the page
          8. The complete code
        4. More about the map
        5. Working with map service layers
          1. Using layer classes
          2. Tiled map service layers
          3. Dynamic map service layers
          4. Adding layers to the map
          5. Setting visible layers from a map service
          6. Setting a definition expression
          7. Map navigation
            1. Map navigation widgets and toolbars
            2. Map navigation using the mouse and keyboard
            3. Getting and setting the map extent
        6. Map events
        7. Summary
      10. 3. Adding Graphics to the Map
        1. The four parts of a graphic
        2. Creating geometry for graphics
        3. Symbolizing graphics
        4. Assigning attributes to graphics
        5. Displaying graphic attributes in an info template
        6. Creating graphics
        7. Adding graphics to the graphics layer
          1. Multiple graphics layers
        8. Time to practice with graphics
        9. Summary
      11. 4. The Feature Layer
        1. Creating a FeatureLayer object
          1. Optional constructor parameters
        2. Defining display modes
          1. Snapshot mode
          2. The on-demand mode
          3. The selection-only mode
        3. Setting a definition expression
        4. Feature selection
        5. Rendering a feature layer
        6. Time to practice with FeatureLayer
        7. Summary
      12. 5. Using Widgets and Toolbars
        1. Adding toolbars to an application
          1. Steps for creating a toolbar
            1. Defining CSS styles
          2. Creating buttons
          3. Creating an instance of the Navigation toolbar
        2. User interface widgets
          1. The BasemapGallery widget
          2. The Bookmarks widget
          3. The Print widget
          4. The Geocoder widget
            1. Time to practice with the Geocoder widget
          5. The Gauge widget
          6. The Measurement widget
          7. The Popup widget
          8. The Legend widget
          9. The OverviewMap widget
          10. The Scalebar widget
          11. The Directions widget
          12. The HistogramTimeSlider dijit
          13. The HomeButton widget
          14. The LocateButton widget
          15. The TimeSlider widget
          16. The LayerSwipe widget
          17. Analysis widgets
        3. Feature editing
          1. Feature service
          2. The editing widgets
            1. The Editor widget
            2. The TemplatePicker widget
            3. The AttributeInspector widget
            4. The AttachmentEditor widget
            5. The Edit toolbar
        4. Summary
      13. 6. Performing Spatial and Attribute Queries
        1. Introducing tasks in ArcGIS Server
        2. An overview of attribute and spatial queries
          1. The Query object
            1. Defining the query properties
              1. Attribute queries
              2. Spatial queries
              3. Limiting the fields returned
          2. Executing the query with QueryTask
          3. Getting query results
        3. Time to practice with spatial queries
        4. Summary
      14. 7. Identifying and Finding Features
        1. Using IdentifyTask to get feature attributes
          1. Introducing IdentifyTask
          2. The IdentifyParameters object
          3. The IdentifyTask attribute
            1. IdentifyResult
          4. Time to practice – implementing the identify functionality
        2. Using FindTask to get the feature attributes
          1. FindParameters
          2. FindTask
          3. FindResult
        3. Summary
      15. 8. Turning Addresses into Points and Points into Addresses
        1. Introducing geocoding
        2. Geocoding with a Locator service in the ArcGIS API for JavaScript
          1. Input parameter objects
            1. Input JSON address object
            2. Input Point object
          2. The Locator object
            1. The AddressCandidate object
          3. The geocoding process
          4. The reverse geocoding process
        3. Time to practice with the Locator service
        4. Summary
      16. 9. Network Analyst Tasks
        1. RouteTask
        2. Time to practice routing
        3. The ClosestFacility task
        4. The ServiceArea task
        5. Summary
      17. 10. Geoprocessing Tasks
        1. Models in ArcGIS Server
        2. Using Geoprocessor – what you need to know
        3. Understanding the service page for a geoprocessing task
          1. Input parameters
        4. The Geoprocessor task
          1. Running the task
            1. Synchronous tasks
            2. Asynchronous tasks
        5. Time to practice with geoprocessing tasks
        6. Summary
      18. 11. Integration with ArcGIS Online
        1. Adding ArcGIS Online maps to your applications with the webmap ID
        2. Adding ArcGIS Online maps to your applications with JSON
        3. Time to practice with ArcGIS Online
        4. Summary
      19. 12. Creating Mobile Applications
        1. ArcGIS API for JavaScript – a compact build
          1. Setting the viewport scale
          2. Time to practice with the compact build
        2. Integrating the Geolocation API
          1. Time to practice with the Geolocation API
        3. Summary
      20. A. Application Design with ArcGIS Templates and Dojo
        1. The Dojo BorderContainer dijit
        2. Additional Dojo layout elements
        3. Time to practice with sample layouts
        4. Summary
      21. Index