Mastering ArcGIS Server Development with JavaScript
eBook - ePub

Mastering ArcGIS Server Development with JavaScript

Ken Doman

Share book
  1. 366 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Mastering ArcGIS Server Development with JavaScript

Ken Doman

Book details
Book preview
Table of contents
Citations

About This Book

Transform maps and raw data into full-fledged web mapping applications using the power of the ArcGIS JavaScript API and JavaScript libraries

About This Book

  • Create and share modern map applications for desktops, tablets, and mobile browsers
  • Present and edit geographic and related data through maps, charts, graphs, and more
  • Learn the tools, tips, and tricks made available through the API and related libraries with examples of real-world applications

Who This Book Is For

This book is intended for intermediate developers who want to design web mapping applications. You should have some experience with geographic information systems, especially with ArcGIS products such as ArcGIS Server. It also helps to have some experience with HTML, CSS, and JavaScript.

What You Will Learn

  • Create single-page mapping applications, lining up data from different sources
  • Search for and display geographic and tabular information based on locations and attributes
  • Customize maps and widgets to deliver the best user experience
  • Present location data intuitively using charts and graphs
  • Integrate mapping applications with your favorite JavaScript frameworks
  • Test the working of your web map application and take advantage of cloud services such as ArcGIS Online
  • Create modern-looking web maps through styling tips and tricks

In Detail

ESRI and its ArcGIS line of software have been an industry leader in digital map production and publication for over 30 years. ArcGIS Server lets you design, configure, and publish maps that can be viewed and edited through the Internet.

After designing basic maps, you may want to find out new and innovative ways to represent information using these maps. In this book, you'll work through practical examples, experiencing the pitfalls and successes of creating desktop and mobile map applications for a web browser using the ArcGIS Server platform.

The book begins by introducing you to ArcGIS Server and ESRI's JavaScript API. You'll work with your first web map and then move on to learn about ESRI's building blocks. A Dojo AMS style widget will help you create your own widgets for a map and then see how to collect geographic data.

Furthermore, you will learn different techniques such as using Dojo Charts to create charts and graphs to represent your data. Then you will see how to use ESRI JavaScript API with other JavaScript libraries and different styling methods to make your map stand out. By the end of the book, you will discover how to make your application compatible with different devices and platforms and test it using testing libraries.

Style and approach

An in-depth guide that explores web application development using ArcGIS Server and the ArcGIS JavaScript API. Topics are explained in the context of developing two applications for fictional clients. Details of application development, including possible pitfalls and best practices, are included in this book.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Mastering ArcGIS Server Development with JavaScript an online PDF/ePUB?
Yes, you can access Mastering ArcGIS Server Development with JavaScript by Ken Doman in PDF and/or ePUB format, as well as other popular books in Informatica & Sviluppo di applicazioni. We have over one million books available in our catalogue for you to explore.

Information

Year
2015
ISBN
9781784396459

Mastering ArcGIS Server Development with JavaScript


Table of Contents

Mastering ArcGIS Server Development with JavaScript
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Your First Mapping Application
Features of the API
The ArcGIS JavaScript API community
Our first Web Map
Our assignment
Setting up the HTML document
Starting from the head
Meta tags and title tags
Cascading style sheets
The Dojo configuration script
The ArcGIS JavaScript API script
Moving from the head to the body
Framing the HTML body
Adding a little style
Adding a script at the end
Asynchronous Module Definition
Loading required modules
The map object
The layers
Adding some action
Events
Tasks
Deferreds and promises
Showing the results
The Map's infoWindow
The InfoTemplate object
A note on proxies
Summary
2. Digging into the API
Finding the ArcGIS JavaScript API documentation
The documentation layout
Object constructor
CSS classes and data- attributes
Properties
Methods
Events
Drawing a map
Constructor options
Autoresize
Basemap
Explaining the center, extent, zoom, and scale
LODs
Properties
loaded
layerIds
spatialReference
Methods
Adding, removing, and retrieving layers
Moving around the map
Updating settings
Events
Layers
Common ArcGIS Server layers
ArcGISDynamicMapServiceLayer
ArcGISTiledMapServiceLayer
GraphicsLayers and FeatureLayers
GraphicsLayers
FeatureLayers
Other layer types
Graphics
Introducing geometry objects
Point
Polyline
Polygon
Extent
Multipoint
Geometry spatial reference
Symbols and renderers
Simple symbols
SimpleLineSymbol
SimpleMarkerSymbol
SimpleFillSymbol
esri/Color
Picture symbols
Renderers
SimpleRenderer
Unique Value Renderer
Class Break Renderer
InfoTemplates
Toolbars
The navigation toolbar
The draw toolbar
The edit toolbar
Tasks
Tasks, parameters, and results
Common tasks
GeometryService
QueryTask
IdentifyTask
FindTask
Locator
Tasks requiring server extensions
Routing
Dijits
Measurement
Print
Bookmarks
Basemaps
Popups and InfoWindows
Editing
AttributeInspector
TemplatePicker
An all-in-one Editor
Summary
3. The Dojo Widget System
A brief history of the Dojo framework
Introducing dojo, dijit, and dojox
The dojo package
The dijit package
The dojox package
The dojoConfig packages
Defining your widget
Declaring modules
Class Inheritance through Dojo
Dealing with classes and inheritance
Working with Evented modules
An overview of the _WidgetBase module
Working with other _Mixins
Adding _TemplatedMixin
Adding _OnDijitClickMixin
Adding _FocusMixin
The event system
Creating our own widget
Picking up where we left off…
The file structure for our application
Defining the layout with Dojo
Framing the page with BorderContainer
Inserting ContentPane
Modifying the layout of our application
Styling our application
Adding our custom package
Setting up our app
Coding our widget
Adding some dojo/text!
Our dijit template
Working with the dijit constructors
Reusing our old code
Loading more templates
Back to our app.js
Summary
4. Finding Peace in REST
Looking at a map server
Working with JSON
JSON and PJSON formatting
Service levels
Map services
Map service layers
Feature services
Layer level
Fields
Domains
Related tables
Common JSON objects
Geometries
Spatial reference
Points
Multipoints
Polylines
Polygons
Envelopes
Symbols
Color
Simple line symbol
Simple marker symbol
Simple fill symbols
Picture marker symbol
Picture fill symbol
Text symbol
Uses
Back to our application
How about that InfoWindow
Summary
5. Editing Map Data
The use cases for webmap editing
Map editing requirements
Feature services
Feature templates
Feature layer
Feature service modes
Snapshot mode
On demand mode
Selection mode
Editing tools
Edit toolbar
Attribute inspector
Template picker
Attachment editor
Editor dijit
Snapping manager
Securing editing services
Restricting user input
Password protected services
Identity manager
A new mapping application
The file setup
The front page
Loading the map
Adding the map layers
Using the proxy
Finding the user's location
The template picker
The attribute inspector
Securing the application
Limiting data entry
Summary
6. Charting Your Progress
Mixing graphs into our maps
Our story continues
Using dojox charting
Creating a chart in JavaScript
The chart object
The chart style
The chart theme
Chart actions and effects
Using Dojox Charts in popups
Using Dojo Charts in our application
Loading the modules
Preparing the popup
Updating the HTML template
Processing the data
Parsing the ethnic data
Parsing the gender data
Parsing the age data
Showing the results
Ethnic graph
Gender graph
Age graph
Introducing D3.js
Adding the D3.js library with Dojo's AMD
Loading another library outside an AMD module
Loading another library within an AMD module
Using D3.js in our application
Adding D3.js to the configuration
Preparing the popup
Processing our data
Displaying the results
Displaying the ethnic graph
Displaying the gender graph
Displaying the age graph
Summary
7. Plays Well with Others
Compatibility with other libraries and frameworks
Popular libraries to play with
Our story continues
An overview of jQuery
How jQuery works
Adding jQuery to your app
Filling in our dropdowns
Adding the QueryTask
Other helper functions
Handling events
Handling the state
How the counties differ
Finally, the block groups
Filling in the states
An overview of Backbone.js
Components of Backbone
The Model
The View
The Collection
Implementing a router
Handling events
Putting some Backbone in your app
Defining the models
Defining the collections
Defining the views
Creating templates
Wiring events
Getting the Backbone to dance
An overview of Knockout.js
Knockout and MVVM
Using Knockout in our app
Defining the ViewModel
Adding custom binding handlers
Defining the View
Applying the ViewModel
A brief overview of AngularJS
Angular and MV*
Angular vocabulary
The app controller
The app service
The app directive
Making a web mapping app more Angular
Overall results with other frameworks
jQuery
Backbone.js
Knocko...

Table of contents