O'Reilly logo

OpenLayers Cookbook by Antonio Santiago Perez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reading features directly using Protocols

OpenLayers allows us to read data from different origins and sources. As we have described in the chapter's introduction, OpenLayers offers the helper classes: protocols and formats.

Protocols are designed to simplify the task of retrieving data from different origins: via HTTP, from an WFS server, and so on.

On the other hand, formats simplifies the task of reading from (or writing to) a given data format. It is very common to load data from different origins and know how to work directly with protocols that can incredibly simplify this task.

Reading features directly using Protocols

As an example, this recipe shows how we can add features from ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required