List of Listings

Chapter 2. Introducing core API concepts

Listing 2.1. A simple ArcGIS JavaScript mapping application

Listing 2.2. Adding a Graphic to the map

Listing 2.3. Add graphics with a QueryTask

Listing 2.4. JavaScript for simple filter application

Listing 2.5. JavaScript to perform a FeatureLayer selection

Chapter 3. Working with the REST API

Listing 3.1. Using GeometryService to buffer a location

Listing 3.2. Intersecting buffered geometries

Chapter 4. Building an application

Listing 4.1. Main index.html file

Listing 4.2. run.js and configuring Dojo

Listing 4.3. main.js–starting the application

Listing 4.4. controllers/appcontroller.js

Listing 4.5. controllers/mapcontroller.js

Listing 4.6. services/mapservices module

Listing 4.7. main.js–modified with services/mapservices

Listing 4.8. controllers/mapcontroller.js–modified to add layers

Listing 4.9. utils/symbolUtil.js module

Listing 4.10. services/mapservices.js–modified to apply renderer

Listing 4.11. index.html–added Bootstrap style sheet

Listing 4.12. widgets/edit/editTools.js

Listing 4.13. controllers/appcontroller.js–added edit widget

Listing 4.14. css/main.css

Chapter 5. Developing a custom data-collection application

Listing 5.1. services/mapservices.js–modified to add your editable feature service

Listing 5.2. controllers/appcontroller.js–adding the TemplatePicker

Listing 5.3. controllers/appcontroller.js–added Editor widget

Listing 5.4. controllers/appcontroller.js–adding your custom edit tool

Listing 5.5. widgets/edit/editTools.js–using dojo/on to listen for map clicks

Listing 5.6. widgets/edit/editTools.js–modified _addPoint method

Listing 5.7. widgets/edit/editTools.js–added prompt to get description

Listing 5.8. widgets/edit/editTools.js–modified to handle issue type

Listing 5.9. widgets/edit/editService.js–saves to local storage

Listing 5.10. widgets/edit/editTools.js–adding requests

Chapter 6. Building a desktop browser application

Listing 6.1. index.html—main HTML for your application

Listing 6.2. js/run.js—set up DojoConfig

Listing 6.3. js/main.js—entry point to application

Listing 6.4. js/services/mapservices.js—helper to load services

Listing 6.5. js/controllers/appcontroller.js—application controller for application

Listing 6.6. js/main.js—use OAuth 2.0

Listing 6.7. index.html—add Sign In link

Listing 6.8. js/utils/securityUtil.js—module to handle credentials

Listing 6.9. js/main.js—save credentials locally

Listing 6.10. js/controllers/appcontroller.js—add Measurement widget

Listing 6.11. js/controllers/appcontroller.js—toggle Measurement widget

Listing 6.12. js/controllers/appcontroller.js—add BasemapToggle widget

Listing 6.13. js/utils/symbolutil.js—add method to supply new symbol

Listing 6.14. js/widgets/editwidget.js—custom Editor widget

Listing 6.15. js/utils/editconfig.js—configuration for AttributeInspector widget

Listing 6.16. js/widgets/editwidget.js—add AttributeInspector

Listing 6.17. data/data.json—mock data for application

Listing 6.18. js/services/employeeservice.js—mock web service

Listing 6.19. js/widgets/editwidget.js—add web service data

Chapter 7. Advanced techniques

Listing 7.1. index.html—simple HTML file for application

Listing 7.2. css/main.css—simple style sheet to get started

Listing 7.3. js/run.js—sets up the Dojo path configuration

Listing 7.4. js/main.js—loads the config.json file

Listing 7.5. js/main.js—loading the Geocoder widget

Listing 7.6. config.json—updated options for widget

Listing 7.7. js/controllers/widgetloader.js—loader module for widgets

Listing 7.8. js/main.js—updated to use the widget loader

Listing 7.9. js/controllers/widgetloader.js—modified to add HTML elements to page

Listing 7.10. js/widgets/map/map.js handles creating map and DOM node

Listing 7.11. js/controllers/widgetloader.js—updated to wait for map to be created

Listing 7.12. basemap and mapOptions—web map specification

Listing 7.13. js/widgets/map/map.js—updated to use web map JSON

Listing 7.14. classBreakRenderer—displaying larger circles

Listing 7.15. manifest.appcache—URLs added

Listing 7.16. js/stores/PouchStore—saves data locally

Listing 7.17. js/widgets/edit/editorService.js—using PouchStore to save data

Appendix B. Dojo basics

Listing B.1. Declaring a new class

Listing B.2. AMD define and require

Listing B.3. Sample widget with all lifecycles defined

Appendix C. Configuring a proxy

Listing C.1. Using the proxy page

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.208.12