Book Image

OpenLayers 3: Beginner's Guide

By : Thomas Gratier, Paul Spencer, Erik Hazzard
Book Image

OpenLayers 3: Beginner's Guide

By: Thomas Gratier, Paul Spencer, Erik Hazzard

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

Introducing OpenLayers


OpenLayers is an open source, client-side JavaScript library for making interactive web maps, viewable in nearly any web browser. Since it is a client-side library, it requires no special server-side software or settings—you can use it without even downloading anything! Originally developed by MetaCarta as a response, in part, to Google Maps, the 2.x series of the library has grown into a mature, popular framework with many passionate developers and a very helpful community. At the time of writing, this version is still actively used and maintained, but this book will focus on the latest version, which is 3.0. For people wishing to switch to OpenLayers 3, particularly people already using the OpenLayers 2 series, the main reasons to change are:

  • OpenLayers 2 was released eight years back, and it has its design flaws. As the first main open source mapping library, its conception has been done along the way with web evolution, particularly with JavaScript. Due to these facts, code modularity suffered and it was becoming impossible to make new evolutions.

  • OpenLayers 3 provides out-of-the-box mobile support.

  • The library ability to easily incorporate animation.

  • The Canvas renderer by default, which is more efficient than the DOM renderer bundled in OpenLayers 2.x, and the WebGL support in the roadmap, enabling a more powerful map display than Canvas.

  • Increased performance and build size using Closure Compiler.

  • The maintenance mode on OpenLayers 2 series that will limit your application for future usages.

You can also add the fact that the library is already used in production, that demonstrates good performance at the Swiss federal geoportal, http://map.geo.admin.ch (see screenshot for reference ) and the OpenGeo Suite, a commercial open source based solution which already bundles the library: