What is OpenLayers?

Exclusive offer: get 50% off this eBook here
Instant OpenLayers Starter [Instant]

Instant OpenLayers Starter [Instant] — Save 50%

Web Mapping made simple and fast! with this book and ebook

£7.99    £4.00
by Alessio Di Lorenzo Giovanni Allegri | May 2013 | Open Source

In this article by Alessio Di Lorenzo and Giovanni Allegri, the authors of the book Instant OpenLayers Starter, we will discuss some basic points about OpenLayers

OpenLayers is an open source map viewing library, originally developed and released by MetaCarta under a BSD license. It is written in pure JavaScript and makes it easy to incorporate interactive maps from a variety of sources into your web pages and applications.

(For more resources related to this topic, see here.)

As Christopher Schmidt, one of the main project developers, wrote on the OpenLayers users mailing list:

OpenLayers is not designed to be usable out of the box. It is a library designed to help you to build applications, so it's your job as an OpenLayers user to build the box.

Don't be scared! Building the box could be very easy and fun!

The only two things you actually need to write your code and see it up and running are a text editor and a common web browser. With these tools you can create your Hello World web map, even without downloading anything and writing no more than a basic HTML template and a dozen line of JavaScript code.

Going forward, step-by-step, you will realize that OpenLayers is not only easy to learn but also very powerful. So, whether you want to embed a simple web map in your website or you want to develop an advanced mash-up application by importing spatial data from different sources and in different formats, OpenLayers will probably prove to be a very good choice.

The strengths of OpenLayers are many and reside, first of all, in its compliance with the Open Geospatial Consortium ( OGC ) standards, making it capable to work together with all major and most common spatial data servers. This means you can connect your client application to web services spread as WMS, WFS, or GeoRSS, add data from a bunch of raster and vector file formats such as GeoJSON and GML, and organize them in layers to create your original web mapping applications.

From what has been said until now, it is clear that OpenLayers is incredibly flexible in reading spatial data, but another very important characteristic is that it is also very effective in helping you in the process of optimizing the performances of your web maps by easily defining the strategies with which spatial data are requested and (for vectors) imported on the client side. FastMap and OpenLayers make it possible to obtain them!

As we already said at the beginning, web maps created with OpenLayers are interactive, so users can (and want to) do more than simply looking at your creation. To build this interactivity, OpenLayers provides you with a variety of controls that you can make available to your users. Tools to pan, zoom, or query the map give users the possibility to actually explore the content of the map and the spatial data displayed on it. We could say that controls bring maps to life and you will learn how to take advantage from them in a few easy steps.

Fast loading and interactivity are important, but in many cases a crucial aspect in the process of developing a web map is to make it instantly readable. Isn't it useful to build web maps if the users they are dedicated to need to spend too much time before understanding what they are looking at? Fortunately, OpenLayers comes with a wide range of possibilities to styling features in vector layers. You can choose between different vector features, rendering strategies, and customize every aspect of their graphics to make your maps expressive, actually "talking" and—why not?—cool!

Finally, as you probably remember, OpenLayers is pure JavaScript, and JavaScript is also the language of a lot of fantastic Rich Internet Application ( RIA) frameworks. Mixing OpenLayers and one of these frameworks opens a wide range of possibilities to obtain very advanced and attractive web mapping applications

Resources for Article :

Further resources on this subject:

Instant OpenLayers Starter [Instant] Web Mapping made simple and fast! with this book and ebook
Published: April 2013
eBook Price: £7.99
See more
Select your format and quantity:

About the Author :

Alessio Di Lorenzo

Alessio Di Lorenzo is a Marine Biologist and an MSc in Geographical Information Systems and Remote Sensing. Now he is living in Pescara, Italy, the place where he was born in October 1979.

One fine day, looking for suitable tools to represent and analyze the environmental phenomena, he discovered GIS and decided that it was worthwhile to investigate the topic. By mixing his personal interest in computer science, open source software, and programming languages with the spatial knowledge, he has concentrated more and more on Web Mapping and Web GIS.

Nowadays, he works as a consultant and trainer for local and central governments and various organizations. Most of his experience concerns the use of geospatial and web technologies to study and manage data from emergency and monitoring plans in the environmental, veterinary, and public health fields. He is author and co-author of articles concerning GIS for various scientific papers and for the TANTO blog.

When not having fun with maps and connected stuff, he likes to spend his time swimming and riding his mountain bike or his motorcycle!

Giovanni Allegri

Giovanni Allegri has a degree in Earth Science from the Centre for Geotechnologies (CGT) at the University of Siena (Italy). He works as a GIS freelance consultant and analyst for public agencies and private companies. His work ranges from Spatial data modeling and GIS analysis, to GIS/WebGIS software development and cartography.

He runs courses on Spatial DB design and management, GIS analysis and WebGIS development, based mainly on free and open source technologies.

Books From Packt

 Instant Designing Interactive Maps Using Leaflet JavaScript Library How-to [Instant]
Instant Designing Interactive Maps Using Leaflet JavaScript Library How-to [Instant]

Programming ArcGIS 10.1 with Python Cookbook
Programming ArcGIS 10.1 with Python Cookbook

GeoServer Beginner’s Guide
GeoServer Beginner’s Guide

 Instant Google Map Maker Starter [Instant]
Instant Google Map Maker Starter [Instant]

OpenLayers Cookbook
OpenLayers Cookbook

OpenLayers 2.10 Beginner's Guide
OpenLayers 2.10 Beginner's Guide


 Python Geospatial Development, Second Edition
Python Geospatial Development, Second Edition

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software