ol & ol-layerswitcher with Browserify

August 5, 2018 ยท View on GitHub

:warning: I've not currently been able to figure out building an OpenLayers v5 application with Browserify. The following work for OpenLayers v4. I'll update for v5 if it looks possible in future - @walkermatt 2018-07-22.

This example demonstrates how the ol package and ol-layerswitcher with Browserify.

Install the project dependencies.

npm install

Create a bundle for the browser.

npm run build

Open index.html to see the result.

open index.html