O'Reilly logo

OpenLayers 3 : Beginner's Guide by Erik Hazzard, Paul Spencer, Thomas Gratier

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

Features and geometries

We've been using feature objects throughout the chapter so far without really talking about the Feature class itself. We also 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, we should go over the Geometry class, as it's used to create the actual geometry objects that make up a feature object.

The Geometry class

Although it is perfectly valid to create features without geometries, they can't be represented on a map. Therefore, the Geometry class is, from the map's point of view, ...

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