Published
Edited
Nov 27, 2020
Importers
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof clusterSize = slider({
min: 10,
max: 300,
step: 1,
value: 120,
title: "clusterSize",
description: 'Higher number means more markers "merged".<br>default: 120',
format: v => `${v}px`
})
Insert cell
viewof categories = checkbox({
title: "Marker Categories",
options: ["yes"],
description: "assign random categories to markers"
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
pc = {
L;
const pruneCluster = require('prunecluster@2').catch(() => ({
PruneCluster: window.PruneCluster,
PruneClusterForLeaflet: window.PruneClusterForLeaflet,
PruneClusterLeafletSpiderfier: window.PruneClusterLeafletSpiderfier
}));

if (!pruneCluster._style) {
const href = await require.resolve(
"prunecluster@2/dist/LeafletStyleSheet.css"
);
document.head.appendChild(
(pruneCluster._style = html`<link href=${href} rel=stylesheet>`)
);
}

return pruneCluster;
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more