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.

Have a go hero – using the circle style

To round out our understanding of the image styles, redo the previous example using ol.style.Circle instead of ol.style.Icon as the image property of the earthquake style. Your result should look something like this (depending on what values you choose):

Text styles

We saw the text style in action in the first example, and we also saw that it wasn't very useful to include a static text style—at least in that example. In general, text styles will be much more useful when the text that is displayed is derived from some property of the feature being displayed. We'll look at how to do that at the end of the chapter, ...

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