Book Image

Mastering ArcGIS Server Development with JavaScript

By : Raymond Kenneth Doman
Book Image

Mastering ArcGIS Server Development with JavaScript

By: Raymond Kenneth Doman

Overview of this book

Table of Contents (18 chapters)
Mastering ArcGIS Server Development with JavaScript
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Drawing a map


When working with the ArcGIS JavaScript API, one of the first things you'll want to do is to create a map. The map transforms a simple div element into an interactive canvas where you can display, request, and even edit geographic data. The map is a complicated object, so we'll spend a significant amount of time focusing on it. Let's learn how to make a map in our scripts.

Constructor options

When a map is first created using the ArcGIS JavaScript API, the developer has numerous parameters that can be used to configure the map. We were exposed to some of those parameters in the previous chapter, when we created our first map application. Let's look into a few of them a little more closely.

Autoresize

The Autoresize function, which by default is true, tells the map whether it should resize itself when the browser changes size or orientation. If you have a full screen map application, and you maximize or resize your browser, the map will automatically adjust and fill the space assigned...