Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor maps code #416

Merged
merged 12 commits into from
Nov 17, 2016
11 changes: 5 additions & 6 deletions app/app.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
require('angular');
require('angular-route');
require('leaflet');
require('leaflet.markercluster');
require('leaflet.locatecontrol/src/L.Control.Locate');
require('angular-leaflet-directive');
require('angular-resource');
require('angular-translate');
require('angular-translate-loader-static-files');
Expand Down Expand Up @@ -71,7 +67,6 @@ angular.module('app',
'pascalprecht.translate',
'ui.bootstrap.pagination',
'angular-datepicker',
'leaflet-directive',
'angular.filter',
'ng-showdown',
'ngGeolocation',
Expand Down Expand Up @@ -109,7 +104,11 @@ angular.module('app',
return require('URIjs/src/URI.js');
})
.factory('Leaflet', function () {
return window.L;
var L = require('leaflet');
// Load leaflet plugins here too
require('imports?L=leaflet!leaflet.markercluster');
require('imports?L=leaflet!leaflet.locatecontrol/src/L.Control.Locate');
return L;
})
.factory('moment', function () {
return require('moment');
Expand Down
Loading