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

Views

The map object is the central component of an OpenLayers web application. It is a central place to add and remove things such as layers and controls, and bind them all together. The remaining chapters in the book will introduce you to these other things, but one of those bits is really very closely tied to the map object, and that is the view object. The view object provides the map with the information it needs to decide what location and level of detail—or zoom level—you are looking at. A view also has a projection (which we discussed in Chapter 2, Key Concepts in OpenLayers) that determines the geospatial reference system of the map.

The view Class

OpenLayers currently provides a single View class, ol.View. This class represents a simple ...

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