O'Reilly logo

OpenLayers 2.10 by Erik Hazzard

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Geometry and Feature classes

We've been using feature objects throughout the chapter so far without really talking about the Feature class itself. We also have hinted at the Geometry class, but we haven't gone into any detail so far. This section will cover both classes in a bit more detail so that you can gain a bit more confidence working with them. Don't worry—it's easy, you've already been exposed to both classes.

Before we get into the Feature class though, we should go over the Geometry class, as it's used to create the actual geometry objects that make up a feature object.

Geometry class

The Geometry class is, more or less, the foundation of the feature objects we've seen so far. Specifically, up to this point, we have been using the Feature.Vector ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required