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 Chrome Developer Tools


Chrome Developer Tools, also called Chrome DevTools, is the built-in debugger included in Google Chrome browser, a free cross-platform browser. Other modern- and standards-based browsers, such as Mozilla's Firefox, Apple's Safari, Opera, and Microsoft Internet Explorer (8+) also work well for debugging web-based applications and sites.

Chrome DevTools and other web development tools make the web development process much easier and quicker. What do we mean by this? With these tools, we can change anything on our site on the fly without editing or saving any files. We can type in JavaScript code with a command-line interface and execute it immediately. We can view all the requests that our web page sends to servers, along with the server's reply. For example, if our map isn't able to get back map images from the server, we can examine the requests our page is making and find out if we have any typos or haven't set up our map layer properly.

Using these tools makes it a lot easier to develop not only an OpenLayers mapping application, but any web application, and makes it easier to fix any bugs we encounter in the process. The choice to use Google Chrome as the first tool for debugging instead of other debuggers is motivated by its large support for mobile testing, the best built-in tools for debugging at the time of this writing, its support for all OS (Windows, Mac, Linux) and some others features. We'll focus mainly on Google Chrome in this chapter and refer back to it throughout the book. Other tools such as Mozilla's Firefox, Internet Explorer (8+), and Apple's Safari's developer tools work just as well (although some functionality may vary).

Getting started with Chrome Developer Tools

To discover this tool, firstly, Google Chrome browser needs to be installed.

So, go to its dedicated download area at http://www.google.com/chrome/ and install it. Depending of your OS, the format for installing the software will be an .exe, a .dmg, a .deb or an .rpm file.