1.0.5 • Published 7 years ago

ui.leaflet.layers.webpack v1.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

ui.leaflet.layers.webpack

UI Leaflet Layers (https://github.com/elesdoar/ui-leaflet-layers) structured with webpack.

Install

Install with npm: npm install --save ui.leaflet.layers.webpack

Usage

require('ui.leaflet.layers.webpack');

angular.module('YourModule', ['ui-leaflet']);

Notes

This module already requires Leaflet, Ui-Leaflet and Leaflet MarkerCluster plugin, so don't require them again.

Also, the Leaflet global object 'L' is exposed through an angular value 'L':

angular.module('example', ['ui-leaflet'])
        .service('MyService', function(L){
            // L is the Leaflet global object. (Not global anymore :)
        });

Build Notes

This module was written with ES6, so you need a babel loader to build.

Install the babel-loader

npm install babel-loader babel-core babel-preset-es2015 webpack --save-dev

Add this loader into your webpack.config file

{
    test: /\.js$/,
    exclude: /(node_modules(?!\/(ui.leaflet.layers.webpack|ui.leaflet.webpack))|bower_components)/,
    loader: 'babel-loader?presets[]=es2015'
},

As this module requires some css files, you have to install a css loader.

Installing:

npm install --save-dev css-loader style-loader  

And configure the loader in webpack.config:

{ 
    test: /\.css$/, loader: "style-loader!css-loader" 
}
1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago