Book Image

Building Web and Mobile ArcGIS Server Applications with JavaScript

By : Eric Pimpler
Book Image

Building Web and Mobile ArcGIS Server Applications with JavaScript

By: Eric Pimpler

Overview of this book

<p>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.</p> <p>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.</p> <p>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.</p> <p>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 ArcGIS.com content into your custom developed applications.</p> <p>This comprehensive guide quickly advances through probing programmatic techniques for building web and mobile GIS applications which will make application development a lot easier!</p>
Table of Contents (20 chapters)
Building Web and Mobile ArcGIS Server Applications with JavaScript
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The Dojo BorderContainer dijit


Since the AGIS API for JavaScript is built directly on top of the Dojo JavaScript framework, you automatically have access to the user interface Dojo libraries, including layout dijits such as BorderContainer. The layout dijits are a set of user interface elements you can add to an application that give you control over the layout of the application. The BorderContainer dijit serves primarily as a container for other child containers and can be one of these two design types: headline or sidebar. You define the design type using the design attribute. The design type can be either headline or sidebar and both can be split into as many as 5 different regions: top, bottom, right, left, and center. Each region is normally filled by a Dojo layout element. It is also possible to nest regions for greater control over the layout of an application. For example, you might include a second BorderContainer within the center region of a master BorderContainer. Using this second BorderContainer, you could then further divide the center region.

In the following code example, we are defining design to be of type headline. This results in the general configuration that you see in the code, with the top and bottom regions stretching across the entire width of the screen space. In this case, you only need to set the height property for the top and bottom regions:

<div id="main-pane" dojoType="dijit.layout.BorderContainer" design="headline">

In the following code example, we define design as sidebar. With the sidebar design, the left and right regions expand to take up 100% of the height of the window, sacrificing the area available to the top and bottom regions. In this case, you need to define only the width style property as the height will always be 100%.

<div id="main-pane" dojoType="dijit.layout.BorderContainer" design="sidebar">

In either case, the center region will conform to fit the amount of space available, based on the sizing of the other regions. The following screenshots that you will see depict both of the design types available for BorderContainer. The first shows a headline style while the second shows a sidebar style.