viewof CrimeMap2 = {
let container = DOM.element('div', { style: `width:${width}px;height:${width/2}px` });
yield container
let map = L.map(container).setView([49.2527, -123.1207], 11.5);
let osmLayer = L.tileLayer('https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}@2x.png', {
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
let VanAreasLayer = L.geoJson(VanAreas, {
weight: 2,
color: "#432",
onEachFeature: onEachFeature
}).bindPopup(function (Layer) {
return Layer.feature.properties.NAME;
}).addTo(map);
let crimePoints = FilteredGeoCrimes.features.map(feature =>
feature.geometry.coordinates.slice().reverse().concat([0.1]));
map.on('click', () =>
mutable nHood = null
);
let crimeLayer = heatLayer(crimePoints).addTo(map);
}