Mastering ArcGIS Server Development with JavaScript
eBook - ePub

Mastering ArcGIS Server Development with JavaScript

Ken Doman

Condividi libro
  1. 366 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Mastering ArcGIS Server Development with JavaScript

Ken Doman

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

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.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Mastering ArcGIS Server Development with JavaScript è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Mastering ArcGIS Server Development with JavaScript di Ken Doman in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Informatica e Sviluppo di applicazioni. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2015
ISBN
9781784396459
Edizione
1
Argomento
Informatica

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...

Indice dei contenuti