Data
A visualization of the frequency and location of instagram photos tagged with #aokhalifax, a grass roots initiative to brighten the perspective of citizens and tourists: the goal being to promote positivity in Halifax.
Options
- size: in meters (default: 30km)
- opacity: in percent/100 (default: 1)
- gradientTexture: url-to-texture-image (default: false)
- alphaRange: change transparency in heatmap (default: 1)
- autoresize: resize heatmap when map size changes (default: false)
Usage
//Halifax, Nova Scotia var map = L.map('mapid', { layers : [base], center : [44.65, -63.57], zoom: 12 }); L.tileLayer('http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg', { subdomains: '1234' }).addTo( map ); L.control.scale().addTo(map); //custom size for this example var heatmap = L.webGLHeatmap({size: 1000}); // dataPoints is an array of arrays: [[lat, lng, intensity]...] var dataPoints = [[44.6674, -63.5703, 37], [44.6826, -63.7552, 34], [44.6325, -63.5852, 41], [44.6467, -63.4696, 67], [44.6804, -63.487, 64], [44.6622, -63.5364, 40], [44.603, - 63.743, 52] ...]; heatmap.setData( dataPoints ); map.addLayer(heatmap);