The Book of OpenLayers3 [Code samples]

These are the code samples for The Book of OpenLayer3. Feel free to download the source code and contribute to this repository:

Requesting a WFS server

This example shows how we can query a WFS server.

The left map retrieves data in WFS format using normal AJAX requests (this is possible because server accepts cross domain requests). The right map retrieves data in GeoJSON format and using JSONP technique, which avoids same domain policy restriction.

Both maps uses a ol.loadingstrategy.createTile strategy queries vector data in a tiles like way.

Source code: