I am struggling to try to import a class in Javascript (located in the leaflet-m2t.js file) is there an error keeps getting thrown m2t is not defined. The file is getting imported just fine, and the error is not in the file but in my code. I would appreciate some help in addressing this problem
require('./leaflet-m2t.js')
$scope.tileProvider = new m2t.tileProvider({
map: map,
tileUrl: '/m2t',
defaultLayer: 'Dark',
tileLayers: [],
outlineLayers: ['Light', {
name: 'Dark',
style: {
"color": "#737373",
"weight": 1,
"fillOpacity": 1,
"fillColor": "#0d0d0d",
'backgroundColor': '#242425',
'clickable': false
}
}]
});