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

Introducing geometry objects


Geometry objects are a collection of coordinates that describe where something is in the world. They give shape to the data we're looking for. They can be used for displaying graphics on a map, or to provide spatial data for queries, or even for geoprocessing services. Geometry objects come in five basic types: point, line, polygon, extent, and multipoint. Any shapes are built on these basic types. Let's take a closer look.

Point

In the ArcGIS API for JavaScript, a point is the simplest geometry object. It contains the x and y coordinates of the point, as well as the point's spatial reference. A point can be constructed with x and y coordinates, plus a spatial reference. It can also be defined by longitude and latitude.

Polyline

A polyline geometry is a collection of one or more arrays of point coordinates. Each array of point coordinates is called a path, and would look like a line when drawn out. Multiple paths can be stored in the same geometry, giving the appearance...