D3VanAreasMap = {
let container = DOM.element('div', { style: `width:${width}px;height:${width/1.6}px` });
yield container;
let map = L.map(container).setView([49.2527, -123.1207], 11.5);
let osmLayer = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
L.svg().addTo(map)
const overlay = d3.select(map.getPanes().overlayPane)
const svg = overlay.select('svg')
const g = svg.append('g').attr('class', 'leaflet-zoom-hide')
const projectPoint = function(x, y) {
const point = map.latLngToLayerPoint(new L.LatLng(y, x))
this.stream.point(point.x, point.y)
}
const projection = d3.geoTransform({point: projectPoint})
const pathCreator = d3.geoPath().projection(projection)
const areaPaths = g.selectAll('path')
.data(VanAreas.features)
.enter()
.append('path')
.attr('fill-opacity', 0.3)
.attr('stroke', 'black')
.attr('stroke-width', 2.5)
const onZoom = () => areaPaths.attr('d', pathCreator)
onZoom()
map.on('zoomend', onZoom)
}