Chapter 7. Styling Features

In this chapter we will cover:

  • Styling features using symbolizers
  • Improving style using StyleMap and the replacement of the feature's attributes
  • Playing with StyleMap and the render intents
  • Working with unique value rules
  • Defining custom rules to style features
  • Styling clustered features

Introduction

Once we know how to work with vector layers, such as adding new features or modifying the existing ones, the question we can have in mind is: how to style them?

The visual representation of features, the style, is one of the most important concepts in GIS applications. It is not only important from the user's experience or designer's perspective but also as an information requirement, for example, to identify features that match certain rules.

The way we visualize features is not only important to make our application much more attractive, but also to improve the way we bring information to the user. For example, given a set of points that represent some temperatures, if we are interested on the hottest zones, we could represent them with different radius and color values. This way, a lesser radius and a color near to blue means a cold zone while a greater radius and a color near to red means a hot zone.

OpenLayers offers us a great degree of flexibility when styling features that can initially seem a bit complex. Concepts such as symbolizers, StyleMap, rules, or filters are all related with the process of styling.

Let's see all this in the following recipes.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.137.117