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

Chapter 10. Vector Layer Style Guide

At this point, you're hopefully getting pretty comfortable with OpenLayers. We've talked about how to customize the appearance of Controls (UI elements), but we haven't talked much about how to customize the appearance of the map itself.

In this chapter, we'll make things look pretty (more or less). We'll:

  • Learn how to style Vector layers in OpenLayers
  • Discuss the Style class and demonstrate how to use it
  • Go over the StyleMap class
  • Work with the Rules class
  • Learn about the Filter class

Let's get to it!

Styling the Vector Layer

In the last chapter, you saw how powerful the vector layer can be. In this chapter, we'll go a bit deeper and talk about how to customize the appearance of the features within your vector layer. ...

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