ol-wrapper
A simple package that enables creating OpenLayers 3 objects using a nested config object, instead of multiple constructor calls.
Example: instead of
const map = target: 'map-div' layers: source: url: 'http://some.wmtsserver.com/{z}/{y}/{x}.png' ;
you can write
const map = olWrapper;
Can be useful for saving map definitions in JSON objects.
Currently only with basic functionality, nothing is added over the OpenLayers 3 API.
Usage:
either add
or use browserify/webpack with
//es5var createOlObject = createOlObject; //es6;