
Security News
CISA Kills Off RSS Feeds for KEVs and Cyber Alerts
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
leaflet-advanced-heatmap
Advanced tools
Advanced heat map plugin for Leaflet. Depends on heatmap module
new AdvancedHeatmapLayer(data, {
heatmap: {
smooth: 1.0
}
}).addTo(map)
import L from 'leaflet'
import { AdvancedHeatmapLayer } from 'leaflet-advanced-heatmap'
const numOfPoints = 1000
const width = 2
const height = 2
let x = width / 2
let y = height / 2
// Brownian (random) motion
const data = []
const step = 0.01
for (let i = 0; i < numOfPoints; i++) {
x += step * Math.random() - step / 2
y += step * Math.random() - step / 2
if (x > width) {
x -= width
} else if (x < 0) {
x += width
}
if (y > height) {
y -= height
} else if (y < 0) {
y += height
}
data.push([
x + 51.5 - width / 2,
y - 0.09 - height / 2,
50 * Math.random()//, 0.1 + 0.2 * Math.random()
])
}
const map = L.map('map').setView([51.505, -0.09], 13)
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map)
new AdvancedHeatmapLayer(data, {
heatmap: {
smooth: 1.0
}
}).addTo(map)
Layer (base) just as it is
createTile
method which we can use to create small canvas tile.createTile
method has old node.js style done
method, for asynccreateTile
how could we know canvas width and height? The answer is this.getTileSize()
Renderer
FAQs
leaflet plugin of advanced heatmap
The npm package leaflet-advanced-heatmap receives a total of 3 weekly downloads. As such, leaflet-advanced-heatmap popularity was classified as not popular.
We found that leaflet-advanced-heatmap demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.