Book Image

Building Web Applications with ArcGIS

By : Hussein Nasser
Book Image

Building Web Applications with ArcGIS

By: Hussein Nasser

Overview of this book

Table of Contents (13 chapters)

Preface

Building Web Applications with ArcGIS is a short book. Short books are hard to write, because I have to condense essential information into less than 150 pages. It is challenging to determine what is essential when you know a lot about a particular subject. The writer has to sacrifice of some content so that they can produce a quality title that readers can really benefit from.

ArcGIS is a suite of software, developed by Esri—Environmental Systems Research Institute. ArcGIS allows its users to view, edit, analyze, and work with geographic data. You can work with geographic data on desktop, web, or mobile. This book tackles the web development side of ArcGIS; it teaches the reader how to build web applications that can interact with ArcGIS.

I am very proud of this title. It is a special book because I have tried a new writing style I haven't used before. This is the first book I have ever written that is purely based on a real-life project. As a reader, you act like a web development company where your clients hand you their requirements. Chapter by chapter you start building the application required by the client gradually: adding functionalities, studying their feasibility, and implementing accordingly. Not only will this teach you the basics of developments for ArcGIS, but it will also relate to your real-life projects as well.

I get bored when I read a book that is cluttered with methods and functions and I have to figure out when and where to use them. Some books give you examples disconnected from reality that you won't ever encounter in your lifetime. This book is different, as each method you use, each library you add, contributes to a requirement requested by a client and it makes sense. You will read and say "yes, this is something my client would definitely request".

Building Web Applications with ArcGIS was designed for web developers who don't necessarily have an experience of ArcGIS. There are going to be three themes running throughout the book. The first theme is design, which is covered in the first two chapters of this book. We will discuss how to interpret requirements, create the interface design, and add basic functionalities such as loading the map. The second theme is development, which is covered in Chapter 3, Querying ArcGIS Services. This is where the reader will add more functionalities such as querying and interacting with the map. The last theme is enrichment and is covered in Chapter 4, Rich Content and Mobile Integration and Chapter 5, Posting Reviews, Ratings, and Photos. It is designed for advanced readers. It will show how to do editing, querying related information, and mobile integration.

All the three themes come under the umbrella of a project called "Bestaurants", where the reader helps a client in Belize, a country on the northeastern coast of Central America. The reader will help improve the Bestaurants project by designing a web interface to visualize the best restaurants, diners, café, and so on in Belize. With each chapter, the Bestaurants' client will ask for new requirements, which the reader will try to implement by the end of the chapter.

What this book covers

Chapter 1, The Bestaurants Project, contains a full description of the Bestaurants project. It breaks down the requirements into small pieces that will be executed in the next four chapters. This chapter will also include some introduction about map services, JavaScript API, and how to set up the necessary web services.

Chapter 2, Setting Up the Basic Web Application, teaches you how to get started with a basic map web page based on the design proposed in Chapter 1, The Bestaurants Project. You will set up the web server, create a simple HTML page, and add necessary code to show the map service published in the previous chapter. You will be able to gradually, throughout the next chapters, fill the page with functionalities.

Chapter 3, Querying ArcGIS Services, teaches you to communicate with the services to query, retrieve, and display the results now that you have developed a basic web viewer website.

Chapter 4, Rich Content and Mobile Integration, makes the web application more interactive by adding more rich tools. You will query and display the related records and do some calculations with the results. This chapter will also enable our site to be viewed on mobile.

Chapter 5, Posting Reviews, Ratings, and Photos, introduces the feature service and editing. It will show you how your client can post restaurant reviews, ratings, and photos.

Appendix, Bestaurants on ArcGIS Online, discusses an alternative way to implement the web applications using ArcGIS online.

What you need for this book

For this book, you'll require:

  • A Windows machine running Windows Server 2008 R2 SP1, preferably, since this is what the book is using Windows 7 and 8 will also work..

  • Esri ArcGIS for Desktop 10.2.x or 10.1 to publish the map service. The book uses ArcGIS 10.2. You can download a trial version from http://www.esri.com/products/free-trials or order from your local Esri distributor.

  • Esri ArcGIS for Server 10.2.x or 10.1 to host the map service. This book uses ArcGIS for Server 10.2. You can order a trial version from your local Esri distributor.

Who this book is for

The book is tailored for web developers who want to learn how to use their skills to write web mapping applications for ArcGIS. The reader doesn't require any ArcGIS knowledge.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "We will install all the software on a single machine called ARCGISMACHINE."

A block of code is set as follows:

<html>
<body>
<h1>Hello, ArcGIS! </h1>
</body>
</html>

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

  dojo.require("esri.map");
  dojo.require("esri.dijit.Legend");
  function startup()

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Click on ArcGIS JavaScript to view the map service."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.