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

Map properties

In Chapter 2, Key Concepts in OpenLayers, we introduced the concept of observable, or KVO, properties and how they can be used. Here are the KVO properties of the Map class:

Name

Type

Description

layergroup

ol.layer.Group

The layergroup property is an instance of ol.layer.Group and is used to manage the layers in the map. Although you can use this property to add and remove layers, there are convenience methods in the Map class to make it easier (see layer methods a little later in this chapter).

size

ol.Size | undefined

The size property represents the size of the map in pixels.

view

ol.IView

The view property is an instance of a View class that provides the spatial context for the map. We will discuss views ...

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