O'Reilly logo

OpenLayers 3 : Beginner's Guide by Erik Hazzard, Paul Spencer, Thomas Gratier

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

Introducing methods to get information from your map

If you remember the description of layers, two main layers types are vector and raster. Some layers with specific ol.source accept methods to access geographic features in your map. The map queries each of the specified layers for this information, but not all layers support this. Only layers that support querying for geographic features will return results.

Without going deep into explanation, think that for the vector, you are querying the features near the point where you've done the click. Whereas for raster, you ask a remote resource to get a position on the image and extrapolate from this position the features of the image.

We will first review how to work with a vector source and then with ...

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