Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = function (state, options) {
L.Icon.Default.imagePath = 'node_modules/leaflet/dist/images/'
L.mapbox.accessToken = options.mapboxToken
var tileLayer = L.mapbox.tileLayer(options.tileLayer)
var map = L.map(options.el, {
center: state.map.center,
zoom: state.map.zoom,
zoomControl: false,
layers: [tileLayer],
attributionControl: false
})
state.on('resize', function () {
map.setZoom(state.map.zoom)
map.setView(state.map.center)
})
var location = L.marker([47, -122], {
icon: L.mapbox.marker.icon({
'marker-size': 'small',
'marker-color': '#fa0'