Book Image

OpenLayers 3: Beginner's Guide

By : Thomas Gratier, Paul Spencer
Book Image

OpenLayers 3: Beginner's Guide

By: Thomas Gratier, Paul Spencer

Overview of this book

<p>This book is a practical, hands-on guide that provides you with all the information you need to get started with mapping using the OpenLayers 3 library.</p> <p>The book starts off by showing you how to create a simple map. Through the course of the book, we will review each component needed to make a map in OpenLayers 3, and you will end up with a full-fledged web map application. You will learn the key role of each OpenLayers 3 component in making a map, and important mapping principles such as projections and layers. You will create your own data files and connect to backend servers for mapping. A key part of this book will also be dedicated to building a mapping application for mobile devices and its specific components.</p>
Table of Contents (22 chapters)
OpenLayers 3 Beginner's Guide
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 7. Wrapping Our Heads Around Projections

When you look at a map, you are looking at a two-dimensional representation of a 3D object (the Earth). Because we are, essentially, 'losing' a dimension when we create a map, no map is a perfect representation of the Earth. All maps have some distortion.

The distortion depends on what projection (a method of representing the earth's surface on a two dimensional plane) you use. In this chapter, we'll talk more about what projections are, why they're important, and how we can use them in OpenLayers. We'll also cover some other fundamental geographic principles that will help make it easier to better understand OpenLayers.

In this chapter, we will cover the following topics:

  • Concept of map projections

  • Types of projections

  • Latitude, longitude, and other geographic concepts

  • The OpenLayers projection class

  • Transforming coordinates

  • Projections in context of raster layers

  • Projections using vector layers

Let's get started!