Book Image

OpenLayers 3.x Cookbook - Second Edition

By : J. Langley, Antonio Santiago
Book Image

OpenLayers 3.x Cookbook - Second Edition

By: J. Langley, Antonio Santiago

Overview of this book

OpenLayers 3 is one of the most important and complete open source JavaScript mapping libraries today. Throughout this book, you will go through recipes that expose various features of OpenLayers 3, allowing you to gain an insight into building complex GIS web applications. You will get to grips with the basics of creating a map with common functionality and quickly advance to more complicated solutions that address modern challenges. You will explore into maps, raster and vector layers, and styling in depth. This book also includes problem solving and how-to recipes for the most common and important tasks.
Table of Contents (9 chapters)
8
Index

Introduction

Imagery is one of the most important kinds of data to work with in a GIS system. An eye-catching map with beautiful cartography can make an immediate difference to the appeal of a mapping application.

This chapter is all about working with different types of raster layers. We have tried to summarize, with a set of recipes, the most common and important use cases you can find day to day when working with OpenLayers and third-party layer providers.

OpenLayers offers several classes to integrate with different imagery providers, from proprietary providers, such as Bing Maps, and MapQuest, to open source ones, such as OpenStreetMap, and Stamen, or even any Web Map Service (WMS) service provider.

The base class for any layer type is ol.layer.Base, which offers a set of common properties and defines the common behavior for other layer classes. The ol.layer.Layer class further extends the base class with some extra methods and creates sub-classes, such as ol.layer.Tile, which we&apos...