Book Image

OpenLayers 3.x Cookbook - Second Edition

By : Peter J. Langley, Antonio Santiago Perez
Book Image

OpenLayers 3.x Cookbook - Second Edition

By: Peter J. Langley, Antonio Santiago Perez

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 (14 chapters)
OpenLayers 3.x Cookbook Second Edition
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Index

Transitioning between weather forecast imagery


When working with geographic information, its geometrical representation in space is not the only important thing. There's also the dimension of time that we can take into account. People are increasingly interested in up-to-date information or data based around particular moments in time.

This way, visualizations can show us how data changes over time: city population, disease outbreaks, weather forecasts, and so on.

In this recipe, we're going to show you how we can create an animation on the client side by transitioning between weather forecasts at different times of the day.

We're going to use a WMTS service from the Met Office (http://www.metoffice.gov.uk), showing the rain evolution at different time instants (as shown in the following screenshot), and we will create an animation by making the previous forecast fade away and the new one fade in. The time of day that the visualization represents will be displayed at the top-right of the map...